Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blazor on server-side: using MongoDB for Identity management

The Asp.Net Core Blazor template in VS 2019 can create a server-side app that will use the Microsoft SQL Server to manage the accounts and claims for identity management.

I would like to use MongoDB instead for account and claims management. This way I want to enable Blazor to use decorators and AuthorizeView to allow specific access for specific identities or claims.

I have scaffolded the Identity construct but I am confused how to proceed.

There is an open source Identity provider available called AspNetCore.Identity.Mongo.

Can I use this provider with blazor and if so how can I integrate this provider into my Blazor project?

Is there any project on github that will demonstrate the necessary adjustments in Blazor for custom identity providers?

like image 445
Frankenstein Avatar asked Jan 08 '20 17:01

Frankenstein


People also ask

Should I use Blazor server or Blazor Wasm?

The Blazor Server hosting model offers several benefits: Download size is significantly smaller than a Blazor WebAssembly app, and the app loads much faster. -The app takes full advantage of server capabilities, including the use of . NET Core APIs.

How many users can Blazor server handle?

With a regular Blazor application and a Standard D1 V2 instance in Azure (which has 3.5GB of memory available), the server could easily handle 5,000 concurrent users. Increase that to 14GB of memory and it could handle 20,000 concurrent users. You can find more information here.


1 Answers

I am looking at doing Similar. Blazor essentially uses Dotnet core, So solutions relevent to that can be implemented.

The relevant Nugetpackage is https://github.com/matteofabbri/AspNetCore.Identity.Mongo/blob/master/README.md For 3.0 use Nuget packages of the 6 series ( latest 6.7 )

Here is a github Example that I found which uses momgoDb as the database for Identity. https://github.com/AlejandroRuiz/CosmosDBTutorial

The Git Hub is the implementation of this Tutorial. enter link description here

like image 128
Shane.A Avatar answered Oct 16 '22 06:10

Shane.A