In a fresh Blazor WebAssembly Standalone App (dotnet new blazorwasm --auth Individual), I updated the call to AddOidcAuthentication() to add Google authentication:
builder.Services.AddOidcAuthentication(options =>{ // Configure your authentication provider options here. // For more information, see https://aka.ms/blazor-standalone-auth builder.Configuration.Bind("Local", options.ProviderOptions); options.ProviderOptions.Authority = "https://accounts.google.com/"; options.ProviderOptions.RedirectUri = "https://localhost:7167/authentication/login-callback"; options.ProviderOptions.PostLogoutRedirectUri = "https://localhost:7167/authentication/logout-callback"; options.ProviderOptions.ResponseType = "id_token"; options.ProviderOptions.ClientId = Environment.GetEnvironmentVariable("GOOGLE_CLIENT_ID");});I am able to log in successfully (I get a token saved in SessionStorage and see that it knows my name), but when I log out, it doesn't "stick". The token is deleted, but when I refresh the page, the token reappears and the app treats me as logged in again. (I'm just using the default code to log in and out.)
Am I doing something wrong that's preventing my logout from "sticking"? Or am I misunderstanding something about Google authentication?
Repo here (but I literally didn't change anything except the code I posted).