Rank 2: Process
Hey everyone,
I’m running into a weird issue with Appwrite’s Google OAuth provider and would love some insight.
Here’s my setup:
- Stack: React app + Appwrite Cloud (region: FRA)
- SDK init:
const client = new Client() .setEndpoint('https://fra.cloud.appwrite.io/v1') .setProject('6567777aa4758208190f');
const account = new Account(client);Login Flow:
await account.createOAuth2Session(
'google',
'http://localhost:3000/auth/success',
'http://localhost:3000/auth/failure'
);
The Google OAuth popup works, I get redirected back to my success URL, and in the Appwrite dashboard I can see a new active session for my user.
But as soon as I call:
await account.get();
I get this response:
{
"message": "User (role: guests) missing scopes [\"account\"]",
"code": 401,
"type": "general_unauthorized_scope",
"version": "1.8.0"
}
So it looks like the client is still considered a guest even though the session exists.
⸻
What I’ve checked so far:
• The project ID and endpoint match between SDK and dashboard.
• Google OAuth redirect URI is authorized in Google Cloud and matches Appwrite.
• The cookie a_session_6567777aa4758208190f_legacy is present in my browser after login.