Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No sign-out authentication handlers are registered. Did you forget to call AddAuthentication().AddCookie("Identity.Application",...)? #32215

Closed
pantonis opened this issue Apr 27, 2021 · 6 comments
Assignees
Labels
area-identity Includes: Identity and providers Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. Status: No Recent Activity

Comments

@pantonis
Copy link

When I call signInManager.SignOutAsync I get No sign-out authentication handlers are registered. Did you forget to call AddAuthentication().AddCookie("Identity.Application",...)?
I have googled the issue and found that you need to add .AddCookie(o =>....) in Startup.cs

Why would someone need to add cookie when it is working only with JWT and localstorage???

Further technical details

  • ASP.NET Core version 5.0.5
  • Include the output of dotnet --info
  • The IDE (VS / VS Code/ VS4Mac) you're running on, and its version VS2019
@Tratcher Tratcher added the area-identity Includes: Identity and providers label Apr 27, 2021
@blowdart
Copy link
Contributor

There's no signout mechanism for JWT, the identity is not persisted between calls, you send it every time. So why would you need to signout?

I don't know what "local storage" is referring to here.

@pantonis
Copy link
Author

pantonis commented Apr 27, 2021

@blowdart regarding the signout you are correct.
@blowdart local storage refers to document in a browser.
However I was getting the same error when I was calling signInManager.PasswordSignInAsync until I understood that this method is used only with cookies. In the official documentation there is no such clarification except for the explanation of the isPersistent param which after 3 hours of searching I found that you need to use the signInManager.CheckPasswordSignInAsync when working with IdentityCore and jwt.

@blowdart
Copy link
Contributor

blowdart commented Apr 27, 2021

But we don't supply local storage logins, unless this is a blazor issue?

SigninManager is part of aspnet identity which does use cookie and sets it all up for you.

@pantonis
Copy link
Author

pantonis commented Apr 27, 2021 via email

@blowdart
Copy link
Contributor

From this conversation it's not clear how local storage plays into any of this. SignInManager is for ASP.NET Identity. ASP.NET identity does not use client-side local storage. ASP.NET Identity does not use JWT. So where are you using SignInManager, what type of project?

@blowdart blowdart added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Apr 28, 2021
@blowdart blowdart self-assigned this Apr 29, 2021
@ghost
Copy link

ghost commented May 3, 2021

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

See our Issue Management Policies for more information.

@ghost ghost closed this as completed May 6, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 5, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-identity Includes: Identity and providers Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. Status: No Recent Activity
Projects
None yet
Development

No branches or pull requests

3 participants