You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two separate groups of users. I want to provide different login/logout screens for each group.
the way I figured that out is by using something like this:
if (group1) // default
Challenge();
else if (group2)
Challenge("SecondScheme");
But whenever I login with the second scheme, the .AspNetCore.Identity.Application cookie is created storing the user principal, along with the second scheme's cookie, despite I'm specifying the second scheme when I log in:
var claimsIdentity = new ClaimsIdentity(
[
new(ClaimTypes.Name, SelectedAccount.UserName),
new(ClaimTypes.NameIdentifier, user.Id)
], "SecondScheme");
await HttpContext.SignInAsync("SecondScheme", new ClaimsPrincipal(claimsIdentity));
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have two separate groups of users. I want to provide different login/logout screens for each group.
the way I figured that out is by using something like this:
In the Program:
I have:
To support this scenario I added a cookie:
But whenever I login with the second scheme, the .AspNetCore.Identity.Application cookie is created storing the user principal, along with the second scheme's cookie, despite I'm specifying the second scheme when I log in:
Beta Was this translation helpful? Give feedback.
All reactions