Categories > Coding > Javascript >

How do I link OAuth2 to an already create email and password account? (Node.js)

Moon

Moon

vip

Posts: 7405

Threads: 314

Joined: Aug, 2020

Reputation: 77

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.

  • 0

Alternate

stop take my rice

vip

Posts: 711

Threads: 115

Joined: Mar, 2022

Reputation: 36

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

  • 0

we are dead

Posts: 1

Threads: 0

Joined: Dec, 2023

Reputation: 0

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.

Geometry Dash

  • 0

Users viewing this thread:

( Members: 0, Guests: 2, Total: 2 )