Blazor server Application Authentication without Identity Server

Viewed 1482

I am new in Blazor server, How can I login in my blazor Server application in exiting database login system(don't want to use identity server and Jwt token).Please give me suggest with full login system.

1 Answers

Since Blazor server runs in an ASP.NET core app, You can use Cookie authentication, or JWT. I suggest you Cookie authentication since it's more simple to use. You just need to add

services.AddAuthentication()
    .AddCookies();

On your Startup.cs and add

app.UseAuthentication();

The Main difference between this and Identity it's the manage of the http responses inside the components.

Here it's a post of how to implement it! Hope it helps you!

Related