feat: email verification - #925
Conversation
todo: resend email logic
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
todo: resend verification email
todo: handle verification callback - success / error
| isMentor: boolean; | ||
| isLoading: boolean; | ||
| currentUser?: User; | ||
| emailVerifedInfo?: EmailNotVerifiedInfo; |
There was a problem hiding this comment.
Thank you!
If this is the only issue with the changes I made in the auth0 area, I'm happy ;)
There was a problem hiding this comment.
The changes made regarding Auth0 are limited I would say. But yeah, looks good!
There was a problem hiding this comment.
Thanks!
I mostly interested in a feedback about the verification email process.
If you can take a look on the server PR too it would be great.
| ApiService.clearCurrentUserFromStorage(); | ||
| } | ||
|
|
||
| // because we need to call it from authContext which doesn't have access to ApiService | ||
| static clearCurrentUserFromStorage = () => { |
There was a problem hiding this comment.
Is this static method still necessary after adding forgetUser to the auth util?
There was a problem hiding this comment.
Yes. forgetUser calls this function.
The problem is that auth/utils not always has a reference to API so if it has reference it calls to clearCurrentUser but if not (it means that apiService is not initiated), it calls clearCurrentUserFromStorage directly.
We definitely should improve the design / structure of the auth / user area. We 2 providers and 2 services.
I did some research about auth0 react wrapper, it can help us clear our code but I didn't want to include this refactor in this PR to avoid big changes at once.
|
Done in #977 |
The flow

- Clicking the button will send the user another verification emailProduct decisions
Server PR - Coding-Coach/find-a-mentor-api#249