Closed erikguntner closed 3 months ago
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 CustomMessage failed with error Cannot read properties of undefined (reading 'url')
.
I was wondering if this was maybe because it is being tested locally or not. Are you getting the same message?
Also note that attempting to send it again after that error results in the error an account with the given email already exists.
So it seems that It is going through on our end but not actually sending.
This does also bring up a question: Do we want to make it so the invite can be sent an indefinite amount of times in the case of the email being deleted or not being received? Currently it seems that the only way to get another email sent is if the user is deleted from the database.
Apart from that the modal works great being responsive and all the buttons work as intended.
@JpadillaCoding I just went through the sign up using an email flow and invite guest flow on my computer with no issues.
so while trying to test it out I get an error CustomMessage failed with error Cannot read properties of undefined (reading 'url')
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
Also note that attempting to send it again after that error results in the error an account with the given email already exists.
There is a way to resend an invite to an existing user by passing MessageAction='RESEND',
to the boto3 client this just hasn't been implemented yet. I can't remember exactly what we decided as far as how we want to handle resends. I'll look through some of the issues and bring it up to PM if I can't find anything.
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
![image](Paste_Your_Image_Link_Here_After_Attaching_Files)Visuals after changes are applied
https://github.com/hackforla/HomeUniteUs/assets/27253583/b4560da6-a1f5-48b3-9816-c5504a124644 https://github.com/hackforla/HomeUniteUs/assets/27253583/049a6932-2d98-43c0-8f12-a366b4d26572