C
C#3y ago
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"];
});
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
google-auth-errors - Pastebin.com
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.
18 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Hotz
HotzOP3y ago
Will do, just a sec Well, seems like the beginning of the log just does not show up because of the amount of text
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Hotz
HotzOP3y ago
Rider Ill check how to save the whole log
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Hotz
HotzOP3y ago
I did, no traffic at all
Hotz
HotzOP3y ago
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Hotz
HotzOP3y ago
Yes, https://localhost:5000/signin-google Actually, that might by the issue Https vs http
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Hotz
HotzOP3y ago
Let me check
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Hotz
HotzOP3y ago
Right, but like I said, I cannot see that anywhere in my terminal
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Hotz
HotzOP3y ago
It just starts in the middle of the error Sure, let me just try to change to http real quick
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Hotz
HotzOP3y ago
Yes, my launch url is https://localhost:5000 Ok, want to hop on call?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server