K
Kinde9mo ago
LIFE

How to get organization name in React SDK

I've been using this code in an older project to retrieve organization name:
const { getClaim } = useKindeAuth();
const orgClaim = (getClaim("org_name")?.value as string) || "";
const { getClaim } = useKindeAuth();
const orgClaim = (getClaim("org_name")?.value as string) || "";
But in my newest project, the claim "org_name" is never present. Why is that? are there other ways of fetching the organization name of the logged in user?
No description
3 Replies
dave_kinde
dave_kinde8mo ago
Hey @LIFE that looks correct to me. I wonder if there is some caching going on with the token. Does it appear if you log in and out again with the user?
LIFE
LIFEOP8mo ago
oops, my last message wasn't sent: Figured it out, you have to customize your access_token
dave_kinde
dave_kinde8mo ago
Ah perfect!
Want results from more Discord servers?
Add your server