Welcome to the Kinde community.

K
A
A
A
M
Members
Misha Moroshko
M
Misha Moroshko
Offline, last seen 3 months ago
Joined June 5, 2024

I’musing handleAuth from import { handleAuth } from "@kinde-oss/kinde-auth-nextjs/server";
I see a 500 response returned from /api/auth/kinde_callback in my next.js app router application
How can I see the error message?

1 comment
M

Manually passing app keys to handleAuth() in @kinde-oss/kinde-auth-nextjs
Any chance to allow us to pass the client id and the client secret manually?

// app/api/auth/[kindeAuth]/route.ts

import { handleAuth } from "@kinde-oss/kinde-auth-nextjs/server";

export const GET = handleAuth({
  clientId: process.env.KINDE_CLIENT_ID_CYPRESS,
  clientSecret: process.env.KINDE_CLIENT_SECRET_CYPRESS,
});

8 comments
M
O

Where can I find the response codes when using the Kinde Management API?
For example, when updating user’s property, I get "PROPERTY_VALUE_UPDATED" on success:

import { Users } from '@kinde/management-api-js';

const result = await Users.updateUserProperties(...);

if (result.code === "PROPERTY_VALUE_UPDATED") {
  ...
}
I’d like to know the possible response codes when performing other actions, e.g. await Users.deleteUser(…)
Are these codes documented somewhere?

5 comments
M
A
O

I’m using the next.js SDK. should I define KINDE_SITE_URL environment variable? how is it being used?

1 comment
K

In the production environment, we’re seeing this error after entering the verification code:

Authentication flow: Received: 9519adf9be46e35561aa1e1765dd | Expected: State not found

1 comment
K

Google login
Do I understand correctly that kinde.com here will be replaced with a custom domain when set?

5 comments
E
M

Custom domain verification failed
I just noticed that the verification failed for the custom domain I set up. I clicked “Verify” again to see if it consistently fails, still waiting to see.
How long does this verification process usually take?
Is it possible to know why the verification fails?
My Kinde domain is: https://surreal.kinde.com

6 comments
O
M
A

How to trigger an email with the verification code?
In our system, when user logged in as user1@gmail.com, they also have a record of other accounts they usually login to, e.g. user2@gmail.com and user3@gmail.com.
When the user clicks on user2@gmail.com, showing the intent of switching to that account, I’d like to trigger a verification code email to user2@gmail.com.
Is this possible?
I’m using Next.js App Router.

6 comments
A
M

Two users are logged in to the app. userA has refreshTokenA, and userB has refreshTokenB.
When I make a POST request to /oauth2/token with grant_type: “refresh_token” and the refreshTokenA, the request succeeds.
If I now make a POST request to /oauth2/token with grant_type: “refresh_token” and the refreshTokenB, the request fails with 401: Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method)
Why is that?

7 comments
K
M

Using the Management API, is there a way to get an access token for a given user (by id or email)?

7 comments
A
M
B

Are there any examples testing the login/signup flows using cypress?

10 comments
C
O
M

Using @kinde/management-api-js v0.7.1, how could I get an access token for a given user e.g. misha@gmail.com ?

3 comments
K
M

Users count doesn’t seem to get updated when I add or delete users.

4 comments
A
M
I

How could I redirect users to my /register page after a Kinde user is created?
I have KINDE_POST_LOGIN_REDIRECT_URL="http://localhost:3000" defined, and I want to preserve the behaviour that after a login the user is redirected to /.
I just want to make sure that after a sign up, the user is redirected to http://localhost:3000/register ?

3 comments
M
K

Is it possible to increase the token expiry time for my Kinde account? Feels like the default is too short as I need to login every day or so while developing my app.

4 comments
C
M

Using the management api in node.js, how could I find a Kinde user with a specific custom property value?

1 comment
K

Do I need to subscribe to Apple Developer program to have the Apple social login on Kinde?

5 comments
K
M

Testing Apple social sign in on localhost
Is it possible to test the Apple sign in locally?
I followed the instructions here, but looks like localhost:3000 is not accepted by Apple in the Apple Developer Portal.
Any ideas?

33 comments
v
M
O

How to get a new access token after updating a custom property?
On my Next.js page (which is a Server Component), I have an authenticated user which I add a custom property for using the Management API.
After adding the property, I’d like to get a new access token that contains the newly added property.
I tried refreshing user claims and tokens, but it didn’t work:

import { getKindeServerSession } from "@kinde-oss/kinde-auth-nextjs/server";

const { getAccessTokenRaw, refreshTokens } = getKindeServerSession();
const accessToken = await getAccessTokenRaw(); // no custom property yet

// custom property is added to the user here using the Management API

await Users.refreshUserClaims({ userId })
await refreshTokens();

const newAccessToken = await getAccessTokenRaw(); // still no custom property
How could I get a new access token that contains the new property (without having the user to login again)?
any ideas? 🙏

22 comments
B
M
C
P
D

Breaking change in @kinde/management-api-js 0.7.0 ?
I just upgraded from 0.6.0 to 0.7.0 and it looks like Users is not exported anymore:

import { Users } from "@kinde/management-api-js";

const { users } = await Users.getUsers();
This works though:
import { getUsers } from "@kinde/management-api-js";

const { users } = await getUsers();
Is this change intentional? It’s not mentioned in the release notes.

6 comments
D
M
C

Show of example of verifying the audience in the access token in Node.js API

1 comment
K

I configured my application to have Email+Password, but I’m getting Email+Code.
What am I doing wrong?

8 comments
C
M

I’m getting this error:

Requested audience ‘http://localhost:8082/v1’ has not been whitelisted by the OAuth 2.0 Client.
How do I fix this?

1 comment
K

I have a Next.js App Router application. When should I use the Email+Code connection id?

3 comments
K
M

How could I generate the client secret for Apple social sign in using TypeScript?

3 comments
K
M