Hacktoberfest / hacktoberfest-2020

Hacktoberfest - App to manage the annual open-source challenge, used for the 2019 & 2020 seasons.

Home Page:https://hacktoberfest.digitalocean.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Validate user who has deleted their email address on GitHub

johndbritton opened this issue · comments

During the sign up flow, a User is created in the new state and promoted to set their email and accept terms.

The email is chosen from the list of verified emails attached to their GitHub account.

We have a validation on user save in all states besides new that requires the email attribute be one of the emails that are verified on the GitHub account.

There's a bug that exists when a user chooses a verified email and successfully enters the registered state, but then they delete that verified email address from their GitHub account.

Because of the validation, we can no longer save the record and the user cannot progress through the other states.

This is working as designed, but also causes issues for the user including an infinite redirect during sign in if the selected email address is no longer verified or has been removed from the associated GitHub account.

We should make a fix for this case. Some options:

  1. Only run the email validation on the registered state
  2. Prompt the user to select an email address if the current email address is not valid
  3. Something else?

cc/ @MattIPv4 as an FYI