kinde-auth-nextjs
kinde-auth-nextjs copied to clipboard
Bug: Wrong return type on `getUserOrganizations()`
Prerequisites
- [X] I have searched the repository’s issues and Kinde community to ensure my issue isn’t a duplicate
- [X] I have checked the latest version of the library to replicate my issue
- [X] I have read the contributing guidelines
- [X] I agree to the terms within the code of conduct
Describe the issue
When using useKindeBrowserClient
, getUserOrganizations()
and userOrganizations
are arays on page load as opposed to KindeOrganiztions
or KindeOrganizations | null
as mentioned, breaking the typings
const { userOrganizations, getUserOrganizations } = useKindeBrowserClient();
const userOrgs = getUserOrganizations();
console.log('userOrganizations', userOrganizations, `isArray: ${Array.isArray(userOrganizations)}`);
console.log('userOrgs', userOrgs, `isArray: ${Array.isArray(userOrgs)}`);
Library URL
https://github.com/kinde-oss/kinde-auth-nextjs
Library version
2.3.8
Operating system(s)
macOS
Operating system version(s)
Sonoma 14.6
Further environment details
No response
Reproducible test case URL
https://github.com/drochag/kinde-nextjs-app-router-starter-kit/pull/1
Additional information
No response