Created
July 20, 2019 17:56
-
-
Save bachoang/f52d201787e249cc3eb82f34f53c4e00 to your computer and use it in GitHub Desktop.
How to set redirect URL for OpenID Connect middleware in MVC application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureAuth(IAppBuilder app) | |
{ | |
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType); | |
app.UseCookieAuthentication(new CookieAuthenticationOptions()); | |
app.UseOpenIdConnectAuthentication( | |
new OpenIdConnectAuthenticationOptions | |
{ | |
ClientId = clientId, | |
Authority = authority, | |
PostLogoutRedirectUri = postLogoutRedirectUri, | |
RedirectUri = "https://www.contonso.com" | |
}); | |
Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment