I need to create an endpoint that matches the configured CallBackPath to make the OpenId Authentication work. But I do not understand what is the use of it?
Will be great if someone can explain it?
builder.Services.AddAuthentication(options =>
{
options.DefaultScheme = "CookieScheme";
options.DefaultChallengeScheme = "GoogleOpenIDScheme";
}
).AddOpenIdConnect("GoogleOpenIDScheme", options=>
{
options.Authority = "https://XXXXXXXX";
options.ClientId = "XXXXXXXX";
options.ClientSecret = "XXXXXXXXXXXX";
options.CallbackPath = "/Security/AuthOpenId";
}
);
After the user is authenticated at the authorization server, the user is redirected back to the client application so that the client can finalize the "flow".
The CallbackPath represents the URL to which the browser should be redirected to and the default value is /signin-oidc.
The picture below shows how it is related:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With