Introduce user - account relation #90

Closed
opened 2025-11-20 05:06:09 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @braginini on GitHub (Dec 23, 2021).

Originally assigned to: @braginini on GitHub.

What?
We need to separate the user entity from the account entity making the user belong to an account.

Why?
Right now every new user (email registered) = an account. This doesn't permit multiple users to share an account which is the core of the multitenancy.

How?
Logically:

  1. Extract user id from the JWT token.
  2. LookuP and account by user id.
  3. Create a new account if the user wasn't found.

Implementation:

  1. Introduce a new field in the Account store to store Users.
  2. Generate account id instead of using user id
  3. Store updated account with a user inside.
Originally created by @braginini on GitHub (Dec 23, 2021). Originally assigned to: @braginini on GitHub. **What?** We need to separate the user entity from the account entity making the user belong to an account. **Why?** Right now every new user (email registered) = an account. This doesn't permit multiple users to share an account which is the core of the multitenancy. **How?** Logically: 1. Extract user id from the JWT token. 2. LookuP and account by user id. 3. Create a new account if the user wasn't found. Implementation: 1. Introduce a new field in the Account store to store Users. 2. Generate account id instead of using user id 3. Store updated account with a user inside.
saavagebueno added the enhancementservermanagement-service2021 Q4 labels 2025-11-20 05:06:09 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#90