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
- 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...
- User ID case sensitivity
I see that through REST (and SDK as well), getting a user is not case sensitive. And even though documentation does not clearly state that it is, the wording "V...