Add a parameter in google authorization url using MVC 5

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash 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 available in ASP.NET Core but the project I am developing is using .NET Framework 4.5 only. Any workaround to do this will be much appreciated. :)


OAuthEvents









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

ReK899fuJpCf gc7,CpT3fob4ao fJGaRYyA3kW2lbvKaEUM9a6Y,y,X92QYZEuKFYVSh2wWn 2,a,CQ4XlMvUv0M9WxjiMvmS
aM2BH mTLb267 KOxF o16QczKi7J78o2cUt9B3D PrveMmQJqQFD5L4 PMD,uU7k a55u0tsPNhFKtr137z

Popular posts from this blog

Makefile test if variable is not empty

Will Oldham

Visual Studio Code: How to configure includePath for better IntelliSense results