-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Update guest invite and guest confirmation flows #639
Conversation
…update-guest-invite
Hey Erik, was there a way you could test the signup feature from the email on local? |
@JpadillaCoding Are you trying to test out the flow on your machine? I think the only way you could test the sign up locally would be by sending an invite to an email you have access to. |
Gotcha, so while trying to test it out I get an error |
@JpadillaCoding I just went through the sign up using an email flow and invite guest flow on my computer with no issues.
This error may be because you are not passing a url in the request. This could be an issue with the .env not having a proper url, but I'm not sure. Happy to debug this during the meeting
There is a way to resend an invite to an existing user by passing |
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.
After testing the feature everything works as expected. A user can invite a guest, the guest can accept the invitation and create a new password, the new account is added to the DB and the account is active.
No suggestions as far as the code, everything looks good!
Closes #405
Close #440
What changes did you make?
The following changes allow coordinators to invite guests to HUU by filling out a short form and sending an invitation link to the provided email. The guest can then accept the invite by clicking the provided link and confirm their account by creating a new password. This PR builds off the work that was done in #558 by handling some edge cases and writing tests. The changes include:
/auth/signin
endpoint handled signing in normally, as well as signing in with a temporary password. In an effort to streamline the process and simplify logic, I used a lambda function to add a link to the email and create a separate endpoint that handles signing in with the temporary password. If the user accepts the invite successfully, they are redirected to the new password page, and auserId
andsessionId
are included in the URL params. These two params then get passed along when creating their new password in order to complete the flow. If unsuccessful, an error message is included in the URL params and displayed to the user.Rationale behind the changes?
After merging #558 I noticed there was still work needed in order to get the invite guest and guest confirmation user flows working properly. These changes allow both flows to be completed.
Testing done for these changes
userId
,sessionId
, anderror
params were successfully being accessed from the URL and that the user's session starts after creating a new password.Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)
Visuals before changes are applied
Visuals after changes are applied
Screen.Recording.2023-11-14.at.6.44.14.PM.mov
Screen.Recording.2023-11-14.at.6.45.10.PM.mov