Welcome to the Kinde community

Home
Members
Yoshify
Y
Yoshify
Offline, last seen 5 hours ago
Joined September 23, 2024
Follow up to this - I've gone through and defined Zod schemas for each different Webhook response type. Validation + type safety in webhooks = ❤️

If anyone else is interested, I've provided the schemas here (as well as an example NextJS app router endpoint using them)

https://gist.github.com/Yoshify/12e70d5a3bbc2c9ed66a4207d2d2e9cc
2 comments
I
Y
Hi team,

I'm currently rolling my own user facing organization management screen ( a lot like Clerks - inviting users, controlling permissions, etc. ) - it actually wasn't as difficult as I expected, just needed to roll my own invite system ( side note: I think natively offering this stuff much like Clerk does would make migrating from Clerk to Kinde like I did a lot easier, just want to put it on your radars if it isn't already )

One thing I have found a little tricky working with the Management API though is pagination. I understand I can specify page_size and next_token but having a way to grab the total amount of users at a glance would be great because at this stage, my table doesn't really know how big the organizations users table could be, and therefore has no idea what to specify as a max page. Likewise, being able to provide a page instead of a next_token as a cursor would make things a lot easier to work with, like using the built-in pagination features of Tanstack Table.

If I'm missing something obvious, please let me know! This isn't a breaking feature for me as I can just turn the table into an infinite scrolling one, but would prefer pagination for the larger orgs.
1 comment
A
Hi all,
Using the latest version of the NextJS App Router SDK

useKindeBrowserClient().organization and useKindeBrowserClient().getOrganization() is typed as KindeOrganization, which should be an object with an orgCode value. In testing, this doesn't appear to be the case - instead the results of this is the orgCode as a string. I spent a little while chasing my tail to figure out why the orgCode was undefined on the object only to realize it's because the object wasn't an object... but a string 😆
2 comments
D
Y
Hi, I'm fairly new here, currently exploring after shifting over from Clerk.

I'm using the NextJS App Router SDK, building a B2B SaaS that relies heavily on the multi-tenancy features Kinde offers.

One thing that seems a little clunky is retrieving organization names. For example, the KindeOrganization typed object returned from the various APIs (useKindeBrowserClient().organization for example) only returns the orgCode. It'd be great if it could return the orgName as well - I believe it'd be a much nicer DX than having to get the org code > get the claim, we'd also get type checks 🙂

If this could also be implemented for the KindeOrganizations type as well that'd be awesome!
2 comments
Y
D