Bug Report: Appwrite .NET SDK CreateOAuth2Token β project_provider_disabled
Issue
Using Appwrite .NET SDK (v3.1.0), CreateOAuth2Token for Google OAuth fails with:
412 Precondition Failed: project_provider_disabled
Even though Google OAuth is enabled in the Appwrite console, and the same project works fine using the Web/JS SDK.
Environment
- Appwrite .NET SDK: v3.1.0
- ASP.NET Core MVC (C#)
- Same Appwrite project as working Web/Next.js implementation
Failing Code
var authUrl = await _account.CreateOAuth2Token(
OAuthProvider.Google,
successUrl,
failureUrl
);
return Redirect(authUrl);
also tried with
var authUrl = await _account.CreateOAuth2Token(
Appwrite.Enum.OAuthProvider.Google,
successUrl,
failureUrl
);
return Redirect(authUrl);
Working Alternative
Manually constructing the OAuth URL works:
var authUrl =
$"{endpoint}/account/sessions/oauth2/google" +
$"?project={project}" +
$"&success={Uri.EscapeDataString(successUrl)}" +
$"&failure={Uri.EscapeDataString(failureUrl)}";
return Redirect(authUrl);
Root Cause
- .NET SDK performs a server-to-server HTTP request
- Web SDK only builds a redirect URL and lets the browser handle OAuth
- Server request loses browser context/cookies and can hit regional proxy inconsistencies
- Results in
project_provider_disabledeven when provider is enabled
Suggestion
- Align .NET SDK behavior with Web SDK (return redirect URL instead of server HTTP call)
- Improve consistency across regional endpoints for OAuth provider metadata
This is genarated by Antigravity.
Uh I think this belongs to GitHub π
Recommended threads
- Backup policies think im on free tier
Cant create more than one policy as im told to ugprade, when clicking upgrade im taken to the upgrade page which confirms im already on pro
- Cant get rid of "get started"
Not that important, but annoying. No matter what I do I cant get the "Get started" to go away, ive added a bunch of web platforms and its just stuck.
- TEAM INVITE
There is a problem with the team invitation. When a user invites other users, that time, the newly created email address they don't get the invite link and old ...