Skip to content
Back

Change user oauth2 to different provider

  • 0
  • Users
jonericcook
28 Jan, 2024, 18:16

Is there a way to give the user the ability to chair their oauth2 provider!

For example is someone uses their Google account to sign in/sign up and want to change it to their Apple account.

TL;DR
Developers are discussing how to change a user's OAuth2 provider. They are considering checking for an existing session and killing it to ensure only the mobile app remains logged in. The documentation states that a user can have multiple ongoing sessions. However, this odd behavior may only occur on mobile devices. Other developers suggest looking up the user using their email address and potentially overriding it. Alternatively, the user may need to delete their account and create a new one. There is also a question about giving the user the ability to switch their OAuth2 provider, such as changing from Google to Apple. No solutions are provided in the thread.
Drake
28 Jan, 2024, 18:17

There's no changing because it's mostly just linked by email.

Drake
28 Jan, 2024, 18:17

Do you have a web or mobile app?

jonericcook
28 Jan, 2024, 18:17

Both

jonericcook
28 Jan, 2024, 18:18

So the user would need to delete their account and then resign up?

jonericcook
28 Jan, 2024, 18:19

Or could I do a function that gets triggered on new user creation and checks to see if the email matches an email I already have and overrides it?

Drake
28 Jan, 2024, 18:32

Nope, Appwrite looks up the user using the email address

Drake
28 Jan, 2024, 18:34

You might run into some odd behavior in mobile because of how the session handling works

jonericcook
28 Jan, 2024, 18:41

So if I was signed in on the web app and also on the mobile app there would be odd behavior?

Drake
28 Jan, 2024, 18:41

No only in mobile

jonericcook
28 Jan, 2024, 18:46

This doc seems to indicate that a user can have multiple on going sessions

jonericcook
28 Jan, 2024, 18:47

To avoid that odd behavior would I need to check for an existing session for the user and kill it so the mobile app is the only one?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more