Aspnetcore: Cannot Signin with Identity in Blazor Server Side Application

Created on 26 Oct 2019  路  5Comments  路  Source: dotnet/aspnetcore

I wrote a simple Blazor Server Side Applicationt to test Blazor and I cannot signin' and signup with Identity, any ideas why this is so?

The Error:

1

My SignIn Code:

2

By Design area-blazor

All 5 comments

Please update the label to area-blazor

Thank you for filing this issue. In order for us to investigate this issue, please provide a minimalistic repro project (ideally a GitHub repo) that illustrates the problem.

Ok, here is my Blazor SignIn Component

1

And here is my SignIn Code:

2

The EditForm calls the SignIn Method, i use normal Identity no IdentityServer

if i click on SignIn i get the error from my isssue

@moritz-mm Seems like you are trying to rewrite the Identity UI in Blazor.

You can't do what you are trying to accomplish as Blazor uses a stateful model and there is no HttpContext available for Identity to use for setting up its cookie.

I'm closing this issue as the recommended way to log-in is to perform a redirect and a form post as in the current default UI.

I'm tagging @blowdart in case he wants to provide guidance about how would someone would write a Blazor-compatible Identity UI.

Filed https://github.com/aspnet/AspNetCore.Docs/issues/15374 so that the requirements for what is needed to log in a user with Identity are.

Was this page helpful?
0 / 5 - 0 ratings