-
-
Save mclasson/481e7d489249aa33ab6f94d6254a88f6 to your computer and use it in GitHub Desktop.
Add Security in AspNetCore part 1
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
services.AddAuthentication(options => | |
{ | |
options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme; | |
options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme; | |
options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme; | |
}) | |
.AddCookieAuthentication(CookieAuthenticationDefaults.AuthenticationScheme, option => | |
{ | |
option.LoginPath = "/home/login"; | |
}) | |
.AddTwitterAuthentication(o => | |
{ | |
o.ConsumerKey = Configuration["Authentication:Twitter:ConsumerKey"]; | |
o.ConsumerSecret = Configuration["Authentication:Twitter:ConsumerSecret"]; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment