C#C
C#4y ago
30 replies
Hotz

Trying to use Google auth in Web API

builder.Services
    .AddAuthentication(opt =>
    {
        opt.DefaultAuthenticateScheme = GoogleDefaults.AuthenticationScheme;
        opt.DefaultChallengeScheme = GoogleDefaults.AuthenticationScheme;
    })
    .AddGoogle(opt =>
    {
        opt.ClientId = builder.Configuration["Authentication:Google:ClientId"];
        opt.ClientSecret = builder.Configuration["Authentication:Google:ClientSecret"];
    });


Whenever I try to make a request to any endpoint, I get a huge wall of errors and the app crashes after a few seconds.

Errors (shorter version than what actually shows up): https://pastebin.com/fgZ79206
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Was this page helpful?