Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Auth pages with auto render mode in blazor #61476

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

Closed
MahdiElahi opened this issue Apr 13, 2025 · 1 comment
Closed

Auth pages with auto render mode in blazor #61476

MahdiElahi opened this issue Apr 13, 2025 · 1 comment
Labels
area-identity Includes: Identity and providers

Comments

@MahdiElahi
Copy link

I want to build a Blazor 8 or 9 project using Interactive Auto . But I want to implement authentication using JWT or identity , so that whenever I want, I can show the login page inside a modal or elsewhere.( without refresh page or ... )

Because I've tested it before — when using a modal and trying to use SignInManager.SignIn inside the login component, it throws a 'headers are read-only, response has already started ' error and doesn't let it work.

I've seen many websites that show auth modals anywhere without refreshing the page, and it works fine.how to do it ?

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Apr 13, 2025
@javiercn javiercn added area-identity Includes: Identity and providers and removed area-blazor Includes: Blazor, Razor Components labels Apr 14, 2025
@MackinnonBuck
Copy link
Member

Thanks for reaching out.

We currently don't have any docs or samples on this, but it should be possible to make this work.
For this to work with an interactive modal, you'll need to move some of the sign in logic to minimal API endpoints from the SignIn Blazor component (since the Blazor component will be running interactively).

We don't have any immediate plans to write a sample like this, but this would be a valuable sample for the community to provide.

@dotnet dotnet locked and limited conversation to collaborators Apr 23, 2025
@MackinnonBuck MackinnonBuck converted this issue into discussion #61634 Apr 23, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
area-identity Includes: Identity and providers
Projects
None yet
Development

No branches or pull requests

3 participants