Kinde

K

Kinde

Join the community to ask questions about Kinde and get answers from other members.

Join
Ttz5/4/2024

nuxt ssr

$auth is null in a Vue component, which makes Kinde unusable for me (existing site). Appears composables are not supported in Nuxt with SSR disabled. I've tried using a custom sessionManager for Nitro (/server/) in Nuxt, but it doesn't persist. Auth flow works and callback URL is invoked, but there's no way to persist the session. Is there a fix, docs or something I'm missing??...
WWiESA5/3/2024

Token expired issues

Hi, I'm using Kinde with Next.js It seems like the token is note refreshed automatically when it has expired. Is this something known? `GET /api/auth/setup 401 in 32ms...
Cchef5/3/2024

KindeServerSession values are null when using Stripe webhook

Hi, I am using NextJS and want to integrate with the Stripe API. I need to use the Stripe's webhook for billing process but as this webhook is called from Stripe URL I cannot retrieve kindeServerSession values to validate the user. ```typescript export async function POST(request: Request) { const {getUser, isAuthenticated} = getKindeServerSession(); const body = await request.text();...
Mmeh5/3/2024

not getting verification emails

our clients are saying they dont get verification emails, it used to work perfectly yesterday. are the servers down?
Ttz5/2/2024

SMTP Server Timeout

Hi. I when I try sending a test email using SMTP settings.. it times out. I'm using Resend and configured it properly. The API key hasn't been used, so it appears Kinde's SMTP isn't calling it. I have a custom domain enabled, so I’m not sure if that may be an issue. Any ideas?...
Kkiryl_ch4/30/2024

How to setup SSO only for one organization?

i am building multy tenancy app and what to know if it is possible to setup SSO only for one oraganization? I can not find it in my dashboard
Cchef4/29/2024

Nextjs SDK redirects me to /api/auth/login which does not exist

As the title says, the <LoginLink> from nextjs sdk redirects me to http://localhost:3000/api/auth/login which does not exists My kinde config is like this ``` KINDE_CLIENT_ID=id KINDE_CLIENT_SECRET=secret...
No description
MMasini4/29/2024

Express Protected Routes: How to pass JWT from client?

Hi, I have an express API which is using the protectRoute and getUser middlewares in each route. From the client-side, I am using Expo and getting a JWT once successfully logging in, but I'm not sure how I should pass this as a parameter when invoking one of my API endpoints. How can I do this?...
Mmariodebono4/28/2024

After calling createOrg({ org_name: 'name' }) a call to /token that returns 500

I am manually calling createOrg as part of the onboarding flow in my react app and I have noticed that once the createOrg comes back and the receive the code in my callback there is a call that goes to /token which comes back with 500 response. the app still works with this. Not sure if this is normal behaviour or because of the 500, after calling createOrg, the user is not automatically logged in the new Org getOrganization() returns no orgCode Am I doing something wrong? is this an issue I need to work around? ...
Mmoroshko4/28/2024

Custom properties added to the wrong token

I added custom properties to the id token, but I see them added to the access token instead of the id token. Is this a known issue?...
No description
Mmoroshko4/28/2024

Extending KindeIdToken type to include the `organizations` claim

I added an organizations claim to the id token and would like TypeScript to know about it so I could do: ``` import { getKindeServerSession } from "@kinde-oss/kinde-auth-nextjs/server"; const { getIdToken } = getKindeServerSession(); const idToken = await getIdToken();...
No description
Mmoroshko4/28/2024

useKindeAuth isLoading doesn't change to false

Trying to get the org in a client component, but isLoading does not change to false. What am I missing? ``` "use client";...
Mmoroshko4/28/2024

Getting organization handle in id token claims

When user visits myapp.com/org-handle, I'd like to check whether the user has access to the org-handle organization, and if so, show them the page. I found how to add organizations to the id token claims, but this array contains the org id and name only. I'd like the org handle to be there. Is this possible? If not, what's the recommended way to check whether the user has access to a specific org given an org handle? I also tried to fetch the list of all organizations using the Management API, but the handle is not returned there either....
Mmoroshko4/27/2024

Permission doesn't work

I added an "admin" permission to a user. However, await getPermissions() returns no permissions: { permissions: [], orgCode: 'org_bcddc426a6d' } And, await getPermission() returns not granted: { orgCode: 'org_bcddc426a6d', isGranted: false } What am I missing?...
No description
Mmoroshko4/27/2024

How to sign the user out when /logout is visited?

In my Next.js App Router application, I'd like to automatically sign the user out when the user visits /logout. This could be helpful if the user is stuck in some weird UI state due to a bug, or the "Sign out" button is not rendered for some reason. Having a simple /logout page to reset the auth could be a time saver at times. How could I achieve this?...
Zzor4/27/2024

Should I include user model in database schema? And how to handle users registering their business?

Hi, how should I handle database schema while using Kinde? Should I try for creating user model in my database schema e.g. username email registryDate gotWarnings? If we answer this question and let's say I shouldn't create a user model since I use Kinde, how should I handle the situation users register their restaurants in my app? I'm not trying to ask something unrelated but how that relation works with the Kinde user and restaurant if I create the restaurant model. I use Convex as my...
No description
Mmoroshko4/27/2024

isAuthenticated === false vs user === null

Is there any difference (maybe performance?) between: ``` import { getKindeServerSession } from "@kinde-oss/kinde-auth-nextjs/server"; const { isAuthenticated } = getKindeServerSession();...
Mmoroshko4/27/2024

Multi-factor auth using SMS - Where is the user's phone number stored?

I enabled "Multi-factor authentication". The first time I logged in using Google, I was asked to enter my phone number to receive the verification code. I then logged out and logged in again. This time, the verification code was automatically sent to my previously entered phone number, which was very nice. However, I thought that the phone number would be stored in the Phone field on the user page, but the Phone field is blank. Where does Kinde store my phone number, and what happens if I enter a different phone number in the Phone field?...
Mmoroshko4/27/2024

Protecting routes in Next.js App Router middleware

Docs at https://kinde.com/docs/developer-tools/nextjs-sdk/#protect-routes-using-middleware mention:
As of right now the middleware in the app router does not work when trying to redirect to api/auth/login. This is because of Next.js caching which causes issues during authentication.
Should I read this as "currently, protecting routes in the middleware doesn't work, and the code examples mentioned in this docs section won't work either"? ...
Mmoroshko4/27/2024

User's first and last names are overridden when user logs in using Google

After user signs up using Google, their first and last names in KindeUser are pre-populated from the Google account. I then go to the Kinde UI and update user's first and last names (these fields are not disabled after all, suggesting they can be modified). If the user now signs out and logs in again, my custom set first and last names are overridden by the Google account's ones. Is this expected? If so, why the first and last names fields in the Kinde UI aren't disabled?...
Next