Aperto Chiuso

JWT authentication WithMultinancy #2010


User avatar
0
takahiro creato
  • ABP Framework version: v4.4.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

im created a multitenancy-multidatabase application, and i have a cookie-based authentication, im want to how if is possible to kepping the multi-tenancy and use the JWT application,and how to authentication per tenant works than,?


1 risposte
  • User Avatar
    0
    maliming creato
    Team di supporto Fullstack Developer

    hi

    JWT has nothing to do with multi-tenancy. The framework will automatically handled If you use the IdentityServer

    If you manually write code to implement JWT, you need to add the TenantId of the current user to the claims.

    https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpUserClaimsPrincipalFactory.cs#L43

Made with ❤️ on ABP v8.2.0-preview Updated on marzo 25, 2024, 15:11