Categories > Coding > Javascript >
How do I link OAuth2 to an already create email and password account? (Node.js)
Posted
How I plan for this system to work is: register an account with email/password first, and then authorize an Oauth2 app in settings somewhere. How could I bind the Oauth2 service with the email/password account? I couldn't find how to do this anywhere in any documentation with the service or other sources online.
Replied
You'll need to build a custom integration to connect OAuth provider accounts with your regular email/password accounts, the OAuth providers themselves don't provide that functionality. OAuth providers only return specific credentials from the linked account on their service. One way to handle it, especially if you're using MongoDB for your database, is to create a collection just for OAuth credentials. You'd link those back to your regular accounts using something like a user ID. Make sure whatever you're using to link the OAuth creds to the user account won't change, for example don't use an email because that can change, whereas on most services a user ID or similar won't ever change. Same goes for the actual OAuth creds themselves, for example don't use a temporary auth token, or an email (unless specific cases where the provider doesn't allow users to change their email/whatever other info you use). Each OAuth provider does things a little differently, so you'll need to investigate what kind of data you can grab after a successful OAuth request (documentation moment). That's a basic rundown but yeah
Cancel
Post
we are dead
Replied
By precisely aligning the replacement footage with the existing audio waveform, editors can achieve seamless transitions without perceptible disruptions in sound quality or timing.
Cancel
Post
Users viewing this thread:
( Members: 0, Guests: 2, Total: 2 )
Cancel
Post