Aspnetcore: Custom Identity In Blazor Application

Created on 3 Feb 2020  路  9Comments  路  Source: dotnet/aspnetcore

How to add a custom identity in my blazor server-side application. with the login page and signup page.

area-blazor question

All 9 comments

Thanks for contacting us.
The best you can do for now is to scaffold the Identity in a new non-Blazor application and copy the changes over to your Blazor app.
We plan to cover this in more details in the docs in the near future.

how can override the built-in login and register page?
I need to customize the login and register page.

how can override the built-in login and register page?
I need to customize the login and register page.

It sounds like you're using the default IdentityUI. If that's the case, scaffolding a specific page (Login and/or Register) will result in the customized pages to be loaded. @Rick-Anderson do we have this documented somewhere, I couldn't find it.

Scaffold Identity but @guardrex hasn't updated it yet for Blazor

There's no delta for a Blazor Server app AFAIK. I've even done it a couple of times. ~I didn't hit any snags.~ I hit minor snags.

snags* ... not with the scaffolding bit. We do have this ...

https://github.com/aspnet/AspNetCore.Docs/issues/15651

... but I don't have guidance yet to work it. It's still assigned to the PU to provide the notes.

EDIT ... Actually, there was one minor issue IIRC ... it was either a nested layout problem (RP layout over the Blazor layout) or just a styles issue where the RP styles didn't match the Blazor styles. Either way, I can work that issue further, but I need to dig into it again and get some notes from Javier on what he had in mind when he opened that issue.

@guardrex can you add a section to the doc outlining Blazor? Create an issue too.

Sure ... I assume you mean just to say basically that the scaffolder works for Blazor Server apps? ... and then something over in Blazor Auth that links to that topic? That will get us started until I hear back from the PU on what else. I'll knock it out this afternoon.

Opened at https://github.com/aspnet/AspNetCore.Docs/issues/16944. Unless reviews land for Blazor PRs today, I'll probably have this done by EOD. Otherwise, I'll get to it within a few days or a week. @nazrulbspi5, you can track on that docs issue for the update.

Was this page helpful?
0 / 5 - 0 ratings