-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Email Verification upon Signup #288
Conversation
Demo Vid: https://youtube.com/shorts/e6q_DAK7Q_g Timeout didn't quite work so just clicked "join team" twice I think |
TODO:
|
I think the current changes in Auth.js are extraneous and can be removed |
Maybe onAuthStateChanged? |
New Demo Vid: https://youtu.be/yzMtmMPuigU Intended Workflow: New User signs up (email verification sent) > User taps "Join Team" button (or taps "Resend Verification Email" if needed) > User is logged into the app and redirected to homescreen ( |
PS does the "join team" and "resend email verification" buttons need debouncing? I noticed that "join team" seemed to trigger multiple times sometimes (like 3 times in a row rapidly, hence janky navigation after tapping "join team" button). |
Yes, and it will be addressed in either debounce 2 (if simple) or debounce-n (if complex) once this PR is merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is your plan to add button spinners for all of this PR's operations? |
# Conflicts: # app/(auth)/signup.js
Assuming that "Join Team" button is hidden to user until email is verified, I guess we could make the "Resend Verification Email" button show a spinner animation until the email is finished sending? For verified users, I suppose the "Join Team" button could show a spinner animation until all async operations were awaited (firestore operations etc) |
Ye it took a very long time for me when I tested it. It's helpful to know that the app received my input and is doing work instead of just trusting it. |
Kind of got loading spinner working for sending verification email, and also kind of fixed bug where it was inconsistent if the new user would be directed to chooseTeam screen upon signup. TODO:
|
you gotta set the "textColor" for the spinner to change |
Changed spinner color to white: I removed the dependency array from the Basically you need to call So now it does work but the user has to manually pulldown to refresh after they verified email Maybe helpful for the useEffect / emailVerified / onIdTokenChanged issue:
|
I think the useEffect works as intended now (it automatically detects when you verified email and then shows "Join Team" button afterwards). To resolve the issues mentioned in my previous comment, I had to set up a setInterval to reload the user and check for updates every 10 seconds. Demo Video (read Youtube video description): https://youtu.be/KpHN71xhFfE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, the functionality works well as I am able to verify my email and sign in. We will want to figure out the Auto send functionality before merging. Additionally, for DX, we will probably want an easy way to disable this for testing purposes as merging this in will limit the amount of accounts we will have access to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job on this! Especially the refresh in the background stuff. It feels really responsive! I only have minor complaints, and certainly have my work cut out to merge this with my stack of PRs.
Had to change the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
When joining new team