legiongis / hmsf-md

Arches project for the Heritage Monitoring Scouts program, maintained by Florida Public Archaeology Network
https://hms.fpan.us
1 stars 0 forks source link

Scout account activation link not working #242

Closed kkemp85 closed 2 years ago

kkemp85 commented 2 years ago

I've had two recent scouts email me to say the activation link in the automated emails isn't working. This could be a fluke, especially since both scouts accounts were activated, but wanted to let you know just in case you wanted to check for an issue.

mradamcox commented 2 years ago

@kkemp85 didn't realize you had made this ticket, but I believe this was the past example of an issue with Outlook that we encountered. To summarize what I found when this issue came up again recently (and how I've addressed it):

When I looked into this further with an Outlook account, I realized that Outlook hits the link that is in the email before the email is delivered--I assume for a security check of some kind--which means that Outlook was actually "activating" the new user account before the user even got the confirmation email. Then, when the user does try to use the activation link the token is invalid because the account had already been activated.

What I did was change the workflow a little bit: Now, when a user clicks the activation link in their email, it takes them to a new HMS page where I placed the actual activation link, and when you click that link, the account is activated. I also set it up so that the user is logged in automatically when they click the link, so overall it's actually easier now for new users because they don't have to type in their username and password when they log in for the first time.

Here's what the new activation page looks like: image