Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Blazor Authentication identity with third party
Post Body

I have been having issues on a good/correct way to do authentication within a Blazor Web Assembly app. I understand they scaffold MVC on the server to do manage this currently and based on the blog posts it does appear they are adding some token authentication but I am still not sure how to make this into a full Blazor application.

My goal is to have the server only be the API endpoint that a front end can gain access to. If I use the authentication scaffold provided am I able to still use that for an API call from a phone app? Secondly if I want to make user accounts local and allow them third party logins I am confused on how to do this, I knew how to do it in MVC and it has stayed the same for the most part but again I would prefer to have everything within the same framework (Blazor) where all calls interact very similarly.

In the link above they mention a few new methods.

builder.Services.AddApiAuthorization();

// Add IdentityServer with support for API authorization
services.AddIdentityServer()
    .AddApiAuthorization<ApplicationUser, ApplicationDbContext>();

// Add JWT authentication
services.AddAuthentication()
    .AddIdentityServerJwt();

Which I am a little confused in understanding the process and how things are managed, can we use this process to run a rest method to login the user as an API endpoint? I have mostly used MVC as my web development process and have done little in SPA, but something is throwing me off here.

Author
Account Strength
90%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
4,721
Link Karma
2,348
Comment Karma
2,373
Profile updated: 17 hours ago
Posts updated: 3 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago