Repository navigation
Templates => Auth 2.0 - #624
Conversation
| { | ||
| // Clear the existing external cookie to ensure a clean login process | ||
| await HttpContext.Authentication.SignOutAsync(_externalCookieScheme); | ||
| await HttpContext.Authentication.SignOutAsync(IdentityCookieOptions.ExternalScheme); |
| <hr /> | ||
| @{ | ||
| var loginProviders = SignInManager.GetExternalAuthenticationSchemes().ToList(); | ||
| var schemes = await SchemeProvider.GetAllSchemesAsync(); |
There was a problem hiding this comment.
Start by adding a manual filter for the identity cookies?
There was a problem hiding this comment.
Maybe we can start by just adding a flag to the AuthenticationScheme called IsRemote, and only set that for our Remote handlers (OAuth based + Twitter), then we can filter for Remote schemes?
There was a problem hiding this comment.
You're baking template logic into the framework.
There was a problem hiding this comment.
Well we need something, I guess for now, lets just bring back what we had, I'll add DisplayName to AuthenticationScheme and have the Auth's set it like before, and resurrect the SignInManager API for Preview 1, and we can figure out a longer term plan for Preview 2 if need
There was a problem hiding this comment.
That's a lot more work than adding a temp filter right here.
There was a problem hiding this comment.
Not really, you underestimate how many places I had to do this exact code pattern last night :)
| @using Microsoft.AspNetCore.Http.Authentication | ||
| @using Microsoft.AspNetCore.Authentication | ||
| @model LoginViewModel | ||
| @inject SignInManager<ApplicationUser> SignInManager |
There was a problem hiding this comment.
Looks like SignInManager isn't used anymore - should it be removed?
|
Updated with the new iteration, SignInManager.GetExternal... is back, and DisplayName has been restored. |
|
Okay I think changes are pretty much good to go, @danroth27 and I are doing final runtime verification, look ok to everyone to merge today? cc @DamianEdwards @davidfowl |
Initial PR for adding Auth 2.0, I also fixed the change to Configure[App]Configuration (cc @glennc)
I only verified that I could compile and run Individual/Single/MultiOrg.
@Tratcher @Eilon @mlorbetske @danroth27 @blowdart @ajcvickers