Open drochag opened 4 days ago
When using useKindeBrowserClient, getUserOrganizations() and userOrganizations are arays on page load as opposed to KindeOrganiztions or KindeOrganizations | null as mentioned, breaking the typings
useKindeBrowserClient
getUserOrganizations()
userOrganizations
KindeOrganiztions
KindeOrganizations | null
const { userOrganizations, getUserOrganizations } = useKindeBrowserClient(); const userOrgs = getUserOrganizations(); console.log('userOrganizations', userOrganizations, `isArray: ${Array.isArray(userOrganizations)}`); console.log('userOrgs', userOrgs, `isArray: ${Array.isArray(userOrgs)}`);
https://github.com/kinde-oss/kinde-auth-nextjs
2.3.8
macOS
Sonoma 14.6
No response
https://github.com/drochag/kinde-nextjs-app-router-starter-kit/pull/1
Thanks @drochag, I'll push a fix for this
Prerequisites
Describe the issue
When using
useKindeBrowserClient
,getUserOrganizations()
anduserOrganizations
are arays on page load as opposed toKindeOrganiztions
orKindeOrganizations | null
as mentioned, breaking the typingsLibrary 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