multitenant multi org to single auth user setup
I currently have a setup on auth0 and I'd like to replicate it on Kinde if possible.
A user can belong to one or many organizations and wll have a default org. When requesting an access token during login the auth0 post login script will call my public api and get the orgs the user belongs to, and adds them to the claims in the token as an array [], there is also a current org id for the current organization the user is in. The claim is useful so the user can get all the org specific data and when the dropdown is changed to a different org, another token is requested with the org id as a parameter and if the api returns with that org as a valid one for the user it adds it to the claim as the current org Is.
I see there is a user data thing you have at kinde, but it seems to only support strings and booleans, which prevents me having a list of orgs as an array, and tere doesn't seem to be a way to conditionally pass data into the token request and have that change the claims logic.
Is this setup or something that achieves similar results possible?
Thanks for your time,
Danny
A user can belong to one or many organizations and wll have a default org. When requesting an access token during login the auth0 post login script will call my public api and get the orgs the user belongs to, and adds them to the claims in the token as an array [], there is also a current org id for the current organization the user is in. The claim is useful so the user can get all the org specific data and when the dropdown is changed to a different org, another token is requested with the org id as a parameter and if the api returns with that org as a valid one for the user it adds it to the claim as the current org Is.
I see there is a user data thing you have at kinde, but it seems to only support strings and booleans, which prevents me having a list of orgs as an array, and tere doesn't seem to be a way to conditionally pass data into the token request and have that change the claims logic.
Is this setup or something that achieves similar results possible?
Thanks for your time,
Danny