JakeLoew
JakeLoew
WWasp
Created by JakeLoew on 1/8/2025 in #đŸ™‹questions
Accessing relation fields on logged in user
Right on đŸ‘Œ Thanks!
6 replies
WWasp
Created by JakeLoew on 1/8/2025 in #đŸ™‹questions
Roll back migration without destroying data
Thank you Mr. Kapa AI.
6 replies
WWasp
Created by JakeLoew on 1/8/2025 in #đŸ™‹questions
Roll back migration without destroying data
Ok. I think I see how I can accomplish what I need by using --create-only and writing the SQL myself so it will be non-descructive, then applying it.
6 replies
WWasp
Created by JakeLoew on 12/18/2024 in #đŸ™‹questions
Use case for functions exposed by wasp/server/operations
No description
9 replies
WWasp
Created by JakeLoew on 12/4/2024 in #đŸ™‹questions
Skip email verification for users invited via email.
Thank you!
13 replies
WWasp
Created by JakeLoew on 12/4/2024 in #đŸ™‹questions
Skip email verification for users invited via email.
Yes, I think it's going to look something like this:
- Our invitation email contains a link with `?token=<some-jwt>`. `Invitation` model has a property `token`.
- `/signup` page checks the url for `?token=`. The token is sent to the custom signup action along with their credentials.
- The custom signup action queries for an `Invitation` with the signup email, and checks that the `token` matches the one sent and is not expired. If it's all good, signup the user with `isEmailVerified:true`. Users without the token will go through the normal email verification flow.
- Our invitation email contains a link with `?token=<some-jwt>`. `Invitation` model has a property `token`.
- `/signup` page checks the url for `?token=`. The token is sent to the custom signup action along with their credentials.
- The custom signup action queries for an `Invitation` with the signup email, and checks that the `token` matches the one sent and is not expired. If it's all good, signup the user with `isEmailVerified:true`. Users without the token will go through the normal email verification flow.
I can see that wasp uses oslo/jwt for do this under the hood, but I'm hesitant to import oslo/jwt into my own code because it doesn't seem to be exposed by wasp intentionally. Do you think it's okay to use oslo/jwt to create and validate jwts in my own code? P.S. Thank you guys for the support on all these questions! It's super helpful.
13 replies
WWasp
Created by JakeLoew on 12/4/2024 in #đŸ™‹questions
Skip email verification for users invited via email.
I think a custom signup action will suit my needs! I've been working on it!
13 replies
WWasp
Created by JakeLoew on 11/5/2024 in #đŸ™‹questions
Is there a way to inject env variables into wasp testing?
Ok, that makes sense to just set up testing for things like this outside of wasp. I see how that could work. Thanks for the help @martinsos!
15 replies
WWasp
Created by JakeLoew on 11/5/2024 in #đŸ™‹questions
Is there a way to inject env variables into wasp testing?
It's okay though, I'm not hung up on it đŸ™Œ
15 replies
WWasp
Created by JakeLoew on 11/5/2024 in #đŸ™‹questions
Is there a way to inject env variables into wasp testing?
The test is for a class that is used on the server, but it's just typescript code and doesn't necessarily have any server dependencies other than those environment variables.
15 replies
WWasp
Created by JakeLoew on 11/5/2024 in #đŸ™‹questions
Is there a way to inject env variables into wasp testing?
I'm running my tests with wasp test client -- the code doesn't seem to be reading in the values from .env.server. Do you expect that it should?
15 replies
WWasp
Created by JakeLoew on 11/5/2024 in #đŸ™‹questions
Is there a way to inject env variables into wasp testing?
Works just fine for my case.
15 replies
WWasp
Created by JakeLoew on 11/5/2024 in #đŸ™‹questions
Is there a way to inject env variables into wasp testing?
I think I can just set them in my vitest block like so:
beforeEach(() => {
process.env.MY_SECRET = 'abc123';
})
beforeEach(() => {
process.env.MY_SECRET = 'abc123';
})
15 replies
WWasp
Created by JakeLoew on 11/5/2024 in #đŸ™‹questions
Is there a way to inject env variables into wasp testing?
Thank you.
15 replies
WWasp
Created by JakeLoew on 9/30/2024 in #đŸ™‹questions
Client Side Routing
We have solved the problem in a similar way to the nginx solution outlined here -- although we are using cloudfront. The solution for us was outside the application layer as well. Thank you for the support!
9 replies
WWasp
Created by JakeLoew on 9/18/2024 in #đŸ™‹questions
How to update data coming from `useQuery`
You're exactly right about what I was looking for. Thanks so much! So queries in wasp update when actions update entities specified within that query. Perfect for my use case. Thanks!
12 replies
WWasp
Created by JakeLoew on 9/18/2024 in #đŸ™‹questions
How to update data coming from `useQuery`
It seems that updateQuery doesn't return the result of createNewBook--only the arguments given to the action. I will need the id of book as part of the data set up the optimistic update. Is there no way to handle a failure?
12 replies
WWasp
Created by JakeLoew on 8/8/2024 in #đŸ™‹questions
find-or-create with social login -- SaaS template
thank you! I'll be following along on this feature!
13 replies
WWasp
Created by JakeLoew on 8/8/2024 in #đŸ™‹questions
find-or-create with social login -- SaaS template
@kapa.ai Is it possible to roll my own OAuth with wasp? I'm confident in part of the process, but still have several unknowns. Knowns: - Remove gitHub from my auth object in main.wasp - Set up a github oauth app with an authorized redirect uri of an api I establish in main.wasp - Write the handler for the /callback api endpoint and authorize with github Unknowns: - Once I get the user's identity from github, how to I set them as the signed in user in wasp?
13 replies
WWasp
Created by JakeLoew on 8/8/2024 in #đŸ™‹questions
find-or-create with social login -- SaaS template
Great, thanks. You are a very smart support bot.
13 replies