-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(auth): Updated authentication logic #122
Conversation
When sending a post request to See this log for example:
An exit with |
Since we're refactoring, could we return DTO's? Create a User.dto.ts that will be returned when the request should return an user. |
I'm not a fan of the long naming of the endpoint This one is up to you, so let me know what you think! |
Let's add
and use it like:
|
Add
|
I think a selective return will do the trick. No worries! |
Sounds cool! |
Agreed! |
We can do that! |
I think these would be typically used AFTER the user has been onboarded. Do let me know if my understanding is incorrect. |
We don't need any info from this endpoint. Sending anything regarding the user without confirming that the user has access to the account it's a security risk. (Even sending errors if the email is not in db would allow a bad actor to know if someone uses our service our not, which is not horrible but not ideal) |
These are used in the onboarding process, before the user has finished the onboarding. |
Description
Fixes #76
Fixes #105
Fixes #97
This PR refactors the logic of the following:
Changes made:
isEmailVerified
to true. No verification emails will be sent/api/auth/send-verification-email
. This logically serves the purpose of creating a user if that doesn't exist and sending the verification code thereafter.