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
- My account got banned without obvious re...
Hello, I’m a normal user of Appwrite. Today I found my account was banned suddenly, and I can’t log in normally. I have only been doing normal development and...
- general_route_not_found - Auth Guide
If you’ve just added a subdomain to your project, verified your DNS records, and confirmed your SSL certificate is working, but you're still hitting a `general_...
- Impossible to get USER after createEmail...
Am using provider to deal with functions linked to appwrite. Here is my login. Future<String?> login(String email, String password) async { try { aw...