Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is CallbackPath in OpenIdConnectAuthenticationHandler?

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";
}
);
like image 789
Sukesh Chand Avatar asked Sep 18 '25 13:09

Sukesh Chand


1 Answers

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:

enter image description here

like image 156
Tore Nestenius Avatar answered Sep 20 '25 02:09

Tore Nestenius