If you use organizations in Kinde, you probably build and maintain multi-tenant software. You might also manage multiple subdomains for those tenants.
To help ensure your organizations’ users are redirected to the right subdomain when they sign in, we’ve added what we call ‘organization handles’.
You add a handle to an organization’s details. The handle exactly matches the top level subdomain name of that organization. For example, clairesgym
is the handle for https://clairesgym.jimsgiantgyms.com
.
Then when you go to set callback URLs for each subdomain, you just use one template URL that uses the {organization_handle}
to construct a URL that works for all your orgs.
- This feature works for top level subdomains only
- Handles must exactly match subdomain names
- Handles must be unique for each organization
Currently, handles can only be added manually through the Kinde admin portal, but we plan to add this as an API function soon.
- In Kinde, go to Settings > Applications > [your application] > Details.
- Scroll to the Callback URLs section and in the Allowed callback URLs field, add
https://{organization.handle}.<mysite>.com.au
, and replace<mysite>
with your web domain. For example,https://{organization.handle}.jimsgiantgyms.com
- Select Save.
- Repeat from step 1 for each app you want to enable this for.
- In Kinde, go to Organizations > [your organization] > Details.
- Enter the subdomain name for this organization to the Handle field, without the added URL information. For example, enter
clairesgym
for the subdomainhttps://clairesgym.jimsgiantgyms.com
. Ensure the subdomain name and the handle match exactly. The handle must also be unique within your Kinde business. - Select Save.