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

Feature Request: Hide or Disable Specific ASP.NET Core Identity Endpoints and Return Bearer Tokens via SignInManager #57899

Open
1 task done
KMastalerz opened this issue Sep 16, 2024 · 2 comments
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.

Comments

@KMastalerz
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I've been searching for documentation and solutions, but I couldn't find anything from Microsoft regarding hiding or disabling specific ASP.NET Core Identity endpoints. My use case is as follows:

Hide Default Identity Endpoints: I would like to use my own custom registration process and prevent exposure of the default Identity registration endpoint. While I know that I can override or replace these endpoints by creating extensions, I’m wondering if there is a built-in way to disable or hide specific Identity endpoints without manual intervention.

SignInManager and Bearer Token Support: I am also considering creating a custom login flow using SignInManager. However, I have noticed that SignInManager does not support generating and returning bearer tokens. It requires manual token generation and additional configuration for authentication, which can be cumbersome and this is tomething I wanted to avoid.

It would be useful if SignInManager could optionally return bearer tokens directly upon successful login, avoiding the need for developers to handle token generation and authentication configuration separately. This would simplify development in cases where we want to use ASP.NET Core Identity but prefer not to handle token generation ourselves. But also would not limit us, to create out own Tokens when we do not want to.

Describe the solution you'd like

Provide a way to hide or disable specific ASP.NET Core Identity endpoints, such as registration, login, etc., either through configuration or built-in mechanisms.

Add support for returning bearer tokens directly via SignInManager without requiring manual token generation and configuration.

Additional context

I want to Login with phone/email/login but also other thru other contexts, like customed ID, although this one is for desktop app. This is due to how original application had worked.

Im creating my own Registration endpoint, since I want more details to be required on registration. Including my own User table fields.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-identity Includes: Identity and providers label Sep 16, 2024
@MackinnonBuck
Copy link
Member

The ability to map identity endpoints separately is tracked by #55792.

SignInManager does support generating Bearer tokens - see https://learn.microsoft.com/aspnet/core/security/authentication/identity-api-authorization#use-token-based-authentication.

Does this meet your needs? If not, could you elaborate on what additional requirements you have?

@MackinnonBuck MackinnonBuck added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Sep 17, 2024
Copy link
Contributor

Hi @KMastalerz. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants