© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago
Ahmed Sayed

Google Redirct Auth problem

When I log in normally, it keeps reminding me to log in with Google, even though I am sure that redirct is correct
Services.AddAuthentication(o =>
{
o.DefaultAuthenticateScheme = GoogleDefaults.AuthenticationScheme;
o.DefaultChallengeScheme = GoogleDefaults.AuthenticationScheme;
}).AddGoogle(
o =>
{
IConfiguration googleAuthNSection = _configuration.GetSection("Authentication:Google");
o.ClientId = googleAuthNSection["ClientId"];
o.ClientSecret = googleAuthNSection["ClientSecret"];
}
);

When I remove the o.DefaultAuthenticateScheme = GoogleDefaults.AuthenticationScheme;
o.DefaultChallengeScheme = GoogleDefaults.AuthenticationScheme;
It works normally, but logging into Google gives me an Error and I can't do redirct. Is there a solution for it?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Problem with Auth
C#CC# / help
3y ago
SameSite problem - google cookies
C#CC# / help
4y ago
Google Auth invalid OAuth state
C#CC# / help
2y ago
Problem .NET Google GenAI SDK
C#CC# / help
3mo ago