abp icon indicating copy to clipboard operation
abp copied to clipboard

Issue with Tenant Configuration in BookStore-Angular-MongoDb Sample Project

Open MehdiElMellali opened this issue 8 months ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

I'm currently working on the BookStore-Angular-MongoDb sample project. I'm trying to implement tenant functionality, but I'm encountering an issue with CurrentTenant.Id. Specifically, CurrentTenant.Id is returning null in my setup.

Here's a screenshot of the issue I'm facing: image

Reproduction Steps

Cloned the repository and followed the setup instructions. Verified that the project is running correctly without tenant-specific code. Attempted to use CurrentTenant.Id, but it returned null.

Expected behavior

No response

Actual behavior

Do I need to configure anything specific in the project to ensure that CurrentTenant.Id is populated correctly? How can I add the tenant ID to the token? Below is an example of the current token I'm using: { "sub": "a966ae1c-ef07-d11b-69e7-3a12ed60a87c", "unique_name": "user", "preferred_username": "user", "email": "[email protected]", "email_verified": "False", "phone_number_verified": "False", "oi_prst": "BookStore_App", "client_id": "BookStore_App", "oi_tkn_id": "30ddcebc-d29c-b33e-03e4-3a12ed6456f6", "jti": "cfc15f79-d8ba-4101-a9e0-24c3dbf5e479", "iss": "https://localhost:44367/", "exp": 1717373398, "iat": 1717369798 }

I would greatly appreciate any guidance or examples on how to properly configure the project to use CurrentTenant.Id and how to include the tenant ID in the token.

Thank you!

Regression?

No response

Known Workarounds

No response

Version

8

User Interface

Angular

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

No response

MehdiElMellali avatar Jun 03 '24 00:06 MehdiElMellali