Steps to reproduce:
- Create an account using social login
- Add a password to the account
- Delete the account
- Immediately attempt to create a new account using the same social login
Expected:
Ideally, I should be able to create a new account at step 4. If that is not possible, there should be a message explaining why I can't.
Actual:
After clicking with "Continue with {provider}" at the login or signup screen, you get redirected back to the login screen if that social login is associated with a recently deleted user account, which still exists in the user table with deleted=true.
Notes:
See Slack thread for discussion of why this happens. Briefly, deleting a user account does not remove the account immediately but sets deleted=true. The user details and identities persist in the system until a task runs, on a 5-minute schedule, to clean up old accounts.
One possible solution would be to clear out identity information immediately when the account is deleted, allowing an immediate new sign up with the same login.