4D-Technologies / openidconnect_flutter

Complete Flutter OpenIdConnect Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parallel Usage of `OpenIdConnectClient` [Multi Tenancy]

ahmednfwela opened this issue · comments

Use case

Multi tenant applications, where a user needs to authenticate each tenant separately, but can switch between them at will.

Proposal

There are 2 possible paths here.

  1. An OpenIdConnectClient per tenant, A single OpenIdIdentity per client: we have to add a tenantId to each client, and provide a way to pass it to each request, similar to what firebase auth is doing.
  2. A shared OpenIdConnectClient, Multiple OpenIdIdentity per client: we need to add a way to uniquely identify/persist multiple OpenIdIdentitys