JudahGabriel / RavenDB.Identity

RavenDB Identity provider for ASP.NET Core. Let RavenDB manage your users and logins.
https://www.nuget.org/packages/RavenDB.Identity/1.0.0
MIT License
61 stars 29 forks source link

Blazor WASM (only) and no server backend? #29

Closed ellipsis-apps closed 8 months ago

ellipsis-apps commented 4 years ago

I'm a long-time .NET developer. I'm playing w/ Blazor WASM (no asp.net core backend) and am wondering whether I can use this package to go directly to a RavenDB cloud instance without the support of using a .net core controller.

My goal is to load the Blazor WASM app as just a bunch of static files, and then interact directly w/ RavenDB cloud...

(BTW: I like what you've done here. You seem to be very committed to RavenDB as a database. I'm looking for experience in alternatives to SQL databases & RavenDB seems to be one of the only ones offering free hosting for developers. I looked at CosmosDB some time ago, but they didn't have anything for Identity in CosmosDB until very recently. And Firebase doesn't really have any really good C# packages.)

gabrielbarceloscn commented 4 years ago

Hi @ellipsis-apps .

In case this works, you´ll expose RavenDB instance sensitive data to client code?

JudahGabriel commented 4 years ago

Hi @ellipsis-apps ,

The question boils down to this:, is Blazor's ".NET in the browser" WASM runtime able to run the RavenDB C# client? My answer is: probably? You'll probably want to ask this in the Raven mailing group.

RavenDB.Client is entirely managed code running on .NET Core, as I recall. Seems like a good candidate for running in Blazor's WASM runtime.

As @gabrielbarceloscn mentioned, not having a backend means you're introducing a new security concern. In RavenDB, security is done by certificates: to connect to the database, you need a certificate. Usually, your backend has that certificate. If you don't have a backend, then your Blazor app would need the certificate. And if your Blazor app has the certificate, so do your users. So you'd need to think about how that could work.

I'm looking for experience in alternatives to SQL databases & RavenDB seems to be one of the only ones offering free hosting for developers

You'll love Raven. It's stable and powerful and fast, and the tooling is fantastic, .NET is a first-class citizen, it's built with .NET Core. 😎 I use it for all my projects, and I dread ever having to write against SQL.