Will make these easier:
In authorize_session, it's either creating a new user record or updating an existing record and then logging in that user. This makes the database queries complicated (as in #13856), and actually we want the behavior to be different based on whether the user is existing or new:
- For existing users that have the relevant records in the database, update any info that changed that should be synced with the oauth info and log them in (as the code does currently).
- For new users, display a page with a form to collect or confirm any additional information. Carry the oauth info through the requests, and don't create anything in the database until they've submitted this form. Then once everything's been created, log them in.
- For this issue, only show a field for email address, which we currently just use if we happen to get it from github and then they have to go edit profile later if they didn't share their email address or wanted to use a different email address. eventually this will also confirm username, avatar, and display name as in the issues linked above
Will make these easier:
users.namedisplay name editable (rather than sync through GitHub) #13771In
authorize_session, it's either creating a new user record or updating an existing record and then logging in that user. This makes the database queries complicated (as in #13856), and actually we want the behavior to be different based on whether the user is existing or new: