Posts

Showing posts with the label google-oauth

Add a parameter in google authorization url using MVC 5

Image
Clash Royale CLAN TAG #URR8PPP Add a parameter in google authorization url using MVC 5 I want to add the prompt and set to select_account parameter in the google OAuth2 authorization URL so that when the user sign-in using google it will always show the google account chooser. prompt select_account I think I found a solution that I can use using OAuthEvents for example: OAuthEvents app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions() { ClientId = "", ClientSecret = "", CallbackPath = new PathString("/GoogleLoginCallback"), Events = new OAuthEvents() { OnRedirectToAuthorizationEndpoint = ctx => { ctx.HttpContext.Response.Redirect(ctx.RedirectUri + "&prompt?=select_account"); return Task.FromResult(0); } } }); But OAuthEvents is only availabl...