Open dam6pl opened 3 months ago
Thanks @dam6pl, this is a bug - we'll fix this for you asap
In the meantime would you be able to grab the orgs from the idToken
/ using the getClaim
helper
Just double checking that you have enabled Hasura mapping intentionally.
We will have to support the hasura mappings in the SDK :) I am working on it now
Hey @peterphanouvong, I checked the fix, but not sure if the issue has been fully resolved. Please take a look at the details below. When I try to get user organizations I get nothing.
const organizations = await kinde.getUserOrganizations();
console.log(organizations); // null
But, when I check the ID token, I can see organizations.
console.log(await kinde.getIdToken());
// {
// ...
// sub: 'kp_b224d812a8db41e4826d1cd376097c8c',
// x-hasura-ext-provider: {},
// x-hasura-org-codes: [ 'org_e7b4dc67239e', 'org_934cf51676099' ],
// x-hasura-organizations: [
// { id: 'org_e7b4dc67239e', name: 'Test DN' },
// { id: 'org_934cf51676099', name: 'dntest' }
// ]
// }
Can you suggest if I'm doing something wrong, please? Thanks!
Hey @dam6pl you're not doing anything wrong! I haven't yet pushed a fix just yet, are you able to grab the information you need by taking from the IdToken instead of using the getUserOrganizations
helper for now?
We're preparing a more substantial fix to support hasura mappings :)
I have a same problem... waiting fix getUserOrganization.
I am working with sdk nextjs 14.x
How is this going? I have the same problem, but I do not have Hasura Mapping enabled.
Prerequisites
Describe the issue
I'm logging in to the organization but cannot retrieve these data in NextJS. I'm unable to get these details by using the following code in the main
Layout.ts
file.ID token returns the following data:
Let me know if you need anything else from my side. This is quite an important issue for me, as it blocks my development. Thanks for your support!
Library URL
https://github.com/kinde-oss/kinde-auth-nextjs/
Library version
2.3.6
Operating system(s)
macOS
Operating system version(s)
14.6.1
Further environment details
No response
Reproducible test case URL
No response
Additional information
No response