Getting organization handle in id token claims
When user visits
myapp.com/org-handle
, I'd like to check whether the user has access to the org-handle
organization, and if so, show them the page.
I found how to add organizations
to the id token claims, but this array contains the org id and name only. I'd like the org handle to be there.
Is this possible?
If not, what's the recommended way to check whether the user has access to a specific org given an org handle?
I also tried to fetch the list of all organizations using the Management API, but the handle is not returned there either.Oli - Kinde•18d ago
Hi @moroshko,
I would suggest creating an
org handle
organization custom property and populate the custom property with the org handles
. And then add the custom property value to the tokens.
Let me know if you have any other questions.moroshko•18d ago
cool, thanks, I'll try that
1KMembers
View on DiscordWant results from more Discord servers?
More PostsPermission doesn't workI added an "admin" permission to a user.
However, `await getPermissions()` returns no permissions: `How to sign the user out when /logout is visited?In my Next.js App Router application, I'd like to automatically sign the user out when the user visiShould I include user model in database schema? And how to handle users registering their business?Hi, how should I handle database schema while using Kinde? Should I try for creating user model in misAuthenticated === false vs user === nullIs there any difference (maybe performance?) between:
```
import { getKindeServerSession } from "@kiMulti-factor auth using SMS - Where is the user's phone number stored?I enabled "Multi-factor authentication". The first time I logged in using Google, I was asked to entProtecting routes in Next.js App Router middlewareDocs at https://kinde.com/docs/developer-tools/nextjs-sdk/#protect-routes-using-middleware mention: