19 May, 2026, 16:05
Bug Report: Appwrite .NET SDK CreateOAuth2Token → project_provider_disabled
Issue
Using Appwrite .NET SDK (v3.1.0), CreateOAuth2Token for Google OAuth fails with:
TypeScript
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
TypeScript
var authUrl = await _account.CreateOAuth2Token(
OAuthProvider.Google,
successUrl,
failureUrl
);
return Redirect(authUrl);
also tried with
TypeScript
var authUrl = await _account.CreateOAuth2Token(
Appwrite.Enum.OAuthProvider.Google,
successUrl,
failureUrl
);
return Redirect(authUrl);
Working Alternative
Manually constructing the OAuth URL works:
TypeScript
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.
TL;DR
Appwrite .NET SDK throws `project_provider_disabled` error for Google OAuth even when enabled in console. Manually construct OAuth URL as workaround. Issue caused by server request losing browser context. Suggestion to align .NET SDK behavior with Web SDK and improve endpoint consistency.Recommended threads
- Custom domain for Google Auth
Hello! I connected my custom domain to my Appwrite project, but I can't get the Google login/consent screen to show my domain instead of the Appwrite domain. I...
- CLI - get Database Totals
Is there a way with the Appwrite CLI to get table row totals (count)❓
- relationships bug or error idk
hey every one, am using am using appwrite on a project and ran into a problem where by created a relationship and two way to be specific and it is stuck on proc...