Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

blazor serverside oidc how to logout?

$
0
0

i have some blazor serverside app that uses our corporate oidc

so startup i have:

builder.Services.AddAuthentication(options =>{    options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;    options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;}).AddCookie().AddOpenIdConnect(options =>{    options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;    options.ResponseType = OpenIdConnectResponseType.Code;    options.Authority = "https://xx.yy.xx/dev";    options.ClientId = "Dev";    options.ClientSecret = "Secreeeet";    options.SaveTokens = true;    options.GetClaimsFromUserInfoEndpoint = true;    options.Scope.Add("email");    options.Scope.Remove("profile");    options.TokenValidationParameters = new TokenValidationParameters    {        NameClaimType = "name"    };    options.SignOutScheme = OpenIdConnectDefaults.AuthenticationScheme;});

and this simply works... redirrets to login page / redirrects back etc. OK

and now i need to have some 'logout' buttonhow should i write this logout method?this is not webassembly so there is no 'redirret to login/ logout' etc methodsso how should this logout be handled?

Thanks and regards;


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>