In my project, I am using both Google and GitHub as OAuth providers. Suppose a user signs up using the Google provider, and later tries to sign in using the GitHub provider with the same email address.
- Does Appwrite automatically merge these accounts?
- Or does it create two separate accounts for the same email?
- If merging is possible, how does Appwrite handle the provider UID and existing session data?
- Yes
- No
- the provider UID is stored in the new session and identity.
Maybe this will also give you more info: https://appwrite.io/docs/products/auth/identities
const session = await account.createSession({ userId, secret });
console.log("session", session);
output :
"$id": "68c1a980e5b89dddecc4",
"$createdAt": "2025-09-10T16:38:25.326+00:00",
"$updatedAt": "2025-09-10T16:38:25.326+00:00",
"userId": "68c184f10009322ad7f5",
"expire": "2026-09-10T16:38:25.518+00:00",
"provider": "oauth2",
"providerUid": "",
"providerAccessToken": "",
"providerAccessTokenExpiry": "",
"providerRefreshToken": "",
"ip": "172.20.0.1",
"osCode": "WIN",
"osName": "Windows",
"osVersion": "10",
"clientType": "browser",
"clientCode": "CH",
"clientName": "Chrome",
"clientVersion": "140.0",
"clientEngine": "Blink",
"clientEngineVersion": "140.0.0.0",
"deviceName": "desktop",
"deviceBrand": "",
"deviceModel": "",
"countryCode": "--",
"countryName": "Unknown",
"current": true,
"factors": [
"email"
],
"secret": "",
"mfaUpdatedAt": ""
}```
here `providerUid` is blank.
Recommended threads
- Need help to create a wrapper which let ...
I’m looking for help setting up Appwrite properly on a VPS so I can build a self-hosting wrapper around it. The goal is to provide a Linux executable that allow...
- redirect uri not working for OAuth with ...
I'm following this tutorial: https://appwrite.io/blog/post/google-oauth-expo#create-an-expo-app but im using an android development build instead. When I run h...
- Cannot use Apple Oauth2 in React Native/...
Hi! I've trying to add the Apple sign in feature into my Expo App. I followed the docs, but I still receiving the error "Cannot set 'location.href'". Can someon...