If you sign up for a product with Google OAuth and the associated email is saved to the database. Then ask a user who wants to log in using an email / password. What is an elegant way to handle this?
I have seen some services like Medium use a magic link. I think it works like that. The user registers with Google. Email is defined in the database. Then, if the user wants to log in via email, a magic link that expires within 15 minutes is sent to the inbox. There is a token inside the link which, I guess, when you click will get the user from the database and connect it.
Is the magic link without a password a good UX?
What are the elegant alternatives?
I think another solution is to connect the user with Google. Then go to step 2 which asks for a username and password. I have seen some services do this. Any thoughts on this approach?
The third thing I can think of is to send a generated password to the users inbox. Then, if the user wants to change it, they can do so in a profile view. If the user wants to access it at a later date, it will be stored in the inbox.