Set new Auth password with custom logic

Previous to upgrading Wasp i had a custom user interface to update the password which set the user.password property with some other custom logic. As i am now supposed to remove the password field from the user entity I was wondering how I would do this now that the password field was moved to the AuthIdentity Entity?
3 Replies
martinsos
martinsos9mo ago
Hey @Gwaggli , great to see you are still rocking it with Wasp :)! So, that is a good question, this is a bit involved part, but these docs should answer all the questions: https://wasp-lang.dev/docs/auth/entities . I will leave it here, to test the docs a bit. If they are no l enough and something is still unclear, pls let me know and we can try to explain and also hopefully improve the docs in the process! @miho FYI
Gwaggli
GwaggliOP9mo ago
Hi @martinsos Yeah sure, love the new DX so far, tho had some stuff to migrate by hand, but i guess it was worth it. I jumped around the docs a lot today and finally went with a different approach where I use the resetPassword and verifyEmail method directly from the client one after the other which ends up doing more or less the same. FYI: i found that the code here https://wasp-lang.dev/docs/auth/entities#custom-signup-action is pretty similar to but not identical to https://wasp-lang.dev/docs/auth/email#creating-a-custom-sign-up-action So just to let you know: while working on the new auth method i had to jump around alot between those two pages and the migration guide.
Auth Entities | Wasp
Wasp supports multiple different authentication methods and for each method, we need to store different information about the user. For example, if you are using the Username & password authentication method, we need to store the user's username and password. On the other hand, if you are using the Email authentication method, you will need to s...
Email | Wasp
Wasp supports e-mail authentication out of the box, along with email verification and "forgot your password?" flows. It provides you with the server-side implementation and email templates for all of these flows.
martinsos
martinsos9mo ago
Thanks @Gwaggli , this does help a lot -> we have an issue for cleaning up that piece of docs, it is a big unorganized at the moment, and this feedback will help when doing that!
Want results from more Discord servers?
Add your server