I created a react app with google auth which is working fine. Now I want to check google token to my dotnet core web API and validate it.
I tried services.AddAuthentication with the AddGoogle method but it's not working.
I also tired a middleware https://github.com/khellang/Middleware/tree/master/src/Authentication.JwtBearer.Google. But this is not working as well
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(x => x.UseGoogle(
clientId: "<google-client-id>",
hostedDomain: "<optional-g-suite-domain>"));
Can anyone tell how we can check and validate google token using dotnet core API in c# with [Authorize] attribute?
My React app running on localhost:3000 and API is on localhost:5001