No sign-out authentication handler is registered for the scheme 'Identity.External' #2082
Comments
SignInManager.SignOut expects there to be an external cookie registered as well which is where that signout call is coming, you can either override SignInManager's SignOut method here: https://github.com/aspnet/Identity/blob/master/src/Identity/SignInManager.cs#L206 Or you can add all of the identity cookies. |
@HaoK Thanks for the pointer, it looks like it fixed the exception. I was wondering why the So, my next question is, why is it that my session is set for only 30 minutes? In the Thanks again! |
The security stamp validator runs every 30 minutes and that's probably invalidating your cookie, you can try removing the registration of that to see if that stops the behavior you are seeing |
@HaoK I figured it out! After your last comment I downloaded a copy of the solution and followed along the method calls to see where I was failing. After a few hours, it turned out that I, for whatever reason months ago, decided not to store a security stamp in the database. I guess I was being lazy since I was going to be the only user, not really sure? Anyway, once I added it in everything started working as I expected it to. Thank you for pointing me in the right direction, I really appreciate it! |
Hello,
For several months now I've been trying to solve an issue with Identity, where 30-min on the dot after signing in, I am greeted by an
Invalid Operation Exception
:Since it was on my blog site, I didn't put too much effort into it, even though it was an annoyance. Now, I'm looking into possibly some real world client work where I'd like to use ASP.NET Core with Identity, but I can't be having this same issue.
Could someone please tell me why this exception throws? I don't want to use external schemes, so why is it trying to sign out of one? When did it sign into one?
Here's the relevant code from my app, hopefully someone can point me in the right direction because I sure as heck can't.
Startup.cs
ServiceCollectionExtensions
I'm not going to include the
ApplicationUserStore
because I highly doubt it has anything to do with the exception. I'd appreciate any help because I am just struggling at this point. Thanks!The text was updated successfully, but these errors were encountered: