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.
Recommended threads
- is `account.get()` safe to be used in th...
I want to user's `id` for authentication. However, a while ago I was told in this server not to use `account.get()` and instead add user preferences for that us...
- Courtesy limit reset for non-profit migr...
Hi Team! I'm the architect for a 501(c)(3) non-profit project (Aaria's Blue Elephant) and we just hit our Free plan Database Read limit (currently at 164%). Th...
- RBAC design question
Hi, I am trying to create RBAC so we will have multiple orgs in the app each org will have 3 roles (admin, member and read only) what is the best way to go ab...