Open Closed

OpenIdDict with MultiTenant Login for Oauth #8764


User avatar
0
dhill created
  • ABP Framework version: v8.3.1
  • UI Type: Blazor WASM / Blazor Server
  • Database System: EF Core (SQL Server)

We need to implement Oauth segregated by Tenant.

I looked into using https://abp.io/modules/Volo.OpenIddict.Pro but it does not seem to support this.

I found a partial solution in this question but it's missing a lot of details. https://abp.io/support/questions/4404/How-to-enable-Openiddict-for-multitenant

Can you provide some guidance on how to accomplish this?

Thanks so much.


1 Answer(s)
  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

    Hello, I have reviewed your question, but your question seems very general, so I will try to explain the rough steps of how to do it.

    Here are the steps:

    1-) Replace the OpenIddict Source Code

    You can do this through ABP Studio as in the picture below:

    2-) Extend each OpenIddict entity (Application, Authorization, Scope, Token) with TenantId and implement IMultiTenant. Ensure your DbContext includes these modified entities, and run migrations to add the TenantId columns. This ensures you have the database schema that contains a TenantId column and, importantly, uses ABP’s multi-tenancy filtering.

    You can basically follow these two steps. Afterwards, if you have a problem with this, if you can forward the log record directly, we can proceed more concretely from there.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 25, 2025, 11:10