bitwarden / passwordless-dotnet

Bitwarden Passwordless.dev .NET SDK.
https://bitwarden.com/
Apache License 2.0
34 stars 10 forks source link

Multi-tenancy example #144

Closed jonashendrickx closed 1 month ago

jonashendrickx commented 1 month ago

This is a multi-tenancy example allowing you to use different API secrets or private API keys per subdomain.

It uses:

For a domain passwordless.local, you would then have tenants:

Where the tenants are:

And then resolves the tenant from the incoming request using IHttpContextAccessor. And retrieves required private API key or API secret from appsettings.json accordingly.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 61.39%. Comparing base (075653a) to head (ccd9d8d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #144 +/- ## ======================================= Coverage 61.39% 61.39% ======================================= Files 43 43 Lines 658 658 Branches 56 56 ======================================= Hits 404 404 Misses 250 250 Partials 4 4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.