Is it possible to locally authenticate a user who has only logged onto my website using Oauth 2 (maybe using Google or Facebook)?
Say a user has only ever logged onto my app using Oauth 2 (ex. Google) and one day decides to log on locally (via email or username and password), he wouldn't be able to log in because you can't access a users password via Oauth. For example, by using Oauth 2, I may only have stored his Google_id and his display name in the database. He probably doesn't even know his Google_id in the first place.
Can he log in locally? I know the situation I just made would make it impossible, but is there a way to structure your database so that the user can log in either locally or with Oauth 2 and access the same account?
Also, wouldn't this be the case if he decides to log in using Oauth 2 via Facebook instead of Google?
If anyone could shed light on this for me I'd be very grateful! I only worry because if a user log on via Oauth 2, makes a lot of progress on my website then logs in locally or via a different social media platform (via Oauth 2), they would be confused and possibly falsely believe their data has been lost.
I'm using SQL and Node.js (Express), not that it matters.