Welcome to the Kinde community.

P
K
A
A
A
We have an app registered with azure, we would like to use Kinde to authenticate guest users. How to integrate Kinde with Azure B2B login?
1 comment
C
const session = await stripeClient.checkout.sessions.create({
success_url: `https://mydomain.com/restoflink and https://mydomain-staging.com/restoflink

Hello, when my application gets redirected to the success_url on staging, the user is still logged in (cookies are still set, etc) and correctly redirects to the success_url. However, on my production url, the user is always logged out and redirected to my home page.


Here's the code for the specific page I want to redirect to:

const {getPermission, getUser} = getKindeServerSession();
const user = await getUser()
const isAdmin = await getPermission("xxxx")

if (!user) {
redirect('/')
}

const userExists = await db.query.users.findFirst({
where: (fields) => eq(fields.kindeId, user.id)
});

if (!userExists) {
redirect('/')
}


const courseExists = await getCourseBySlug(params.course)

if (!courseExists) {
return <p className="mx-auto text-center font-extrabold mt-40">Course not found</p>;
}

if (!courseExists.isPublished && !isAdmin?.isGranted) {
redirect('/')
}
2 comments
g
I
what are the rate limits of SSO providers when using the Kinde credentials, for let's say e.g. google?
Because I feel like for small apps I could just use Kinde's oauth credentials instead of setting up my own, no?
6 comments
S
d
C
e
Hi,

I'm trying to integrate the SDK into my web application. My backend is written in ExpressJS and my frontend in AngularJS.
The authentication flow is as follows:
1) User presses a button to Sign in with Kinde.
2) The user is navigated to the backend via window.location.href = this.api.address + 'kinde/login'
3) A check is made to see if user is authenticated (via await kindeClient.isAuthenticated(req))
4) If not authenticated, the user is redirected to BACKEND_URL/login via res.redirect('/login')
5) The user then enters the credentials and is redirected back to BACKEND_URL/login

This is the case if I enter from BACKEND_URL/login manually, but when I start from the frontend, after entering my credentials in Kinde, I get redirected to the unAuthorisedUrl
6 comments
R
I
Hello,

I'm getting this error when trying to store a user id to a KindeId in my prisma ORM

Object literal may only specify known properties, and 'kindeId' does not exist in type 'UserWhereUniqueInput'.ts(2353)

import {PrismaClient} from "@prisma/client";
import {getKindeServerSession} from "@kinde-oss/kinde-auth-nextjs/server";
import {NextResponse} from "next/server";

const prisma = new PrismaClient();

export async function GET() {
const {getUser} = getKindeServerSession();
const user = await getUser();

if (!user

user == null

!user.id)
throw new Error("something went wrong with authentication" + user);

let dbUser = await prisma.user.findUnique({
where: {kindeId: user.id}
});

if (!dbUser) {
dbUser = await prisma.user.create({
data: {
kindeId: user.id,
firstName: user.given_name ?? "",
lastName: user.family_name ?? "",
email: user.email ?? "" // Using nullish coalescing operator to provide a default empty string value
}
});
}

return NextResponse.redirect("http://localhost:3000/dashboard");
}

I confirmed that the KindeId is unique in my prisma model. Would love a second pair of eyes.
6 comments
C
P
I would like to create a page so that the user can change his first name, last name, email, password... but I can't find docs to do it.
17 comments
I
D
C
Hello,

I am using the NextJS SDK (server & client) to get the org details, it is not returning the org name, the property for "city" is undefined as I added a value through the UI and I have added a custom property and it is not showing in the org details. It is showing in the ID token and Access token as I have extended those to include the custom property.

Is this the expected behaviour?


Response from:
const { getOrganization } = getKindeServerSession();
const org = await getOrganization();
console.log(org, "org");

{
orgCode: 'org_**',
orgName: null,
properties: {
city: undefined,
industry: undefined,
postcode: undefined,
state_region: undefined,
street_address: undefined,
street_address_2: undefined
}
-> is billing_customerid not supposed to be part of properties? It is set to PublicResponse from: const { getIdToken } = getKindeServerSession(); const idToken = await getIdToken(); console.log(idToken, "idToken"); organizations: [ { id: 'org*', name: 'Test Organisation' } ],
organization_properties: { billing_customer_id: { v: '**' } },
7 comments
C
r
Hi guys,

I'm currently building an application as a contractor for a client, using the next.js SDK. Once I've finished building the application for him, I'd like for him to be able to completely manage everything on his own, including adding users.

Due to his business model where he physically goes and works with businesses around Australia and does in-person training, the application I'm building will be invite only, ie people won't be able to just sign up, my client will have to setup the organisation and users within the app.

The problem is, I don't want him to have to log in to the Kinde dashboard to set up organisations and users, I'd like for him to be able to manage it all from within the application's dashboard. Is it possible to set up a workflow like this where he can create users from within the application I'm building?
3 comments
S
C
J
I am using sveltkit, after a user logs by selecting their organization, is it possible to switch the logged in organization without logging out? I asked @KindeAI and it didn't have an answer
6 comments
K
I
C
c
Please add a profile dropdown component where the picture, image, name, email, and all other details will be rendered, along with the logout button inside it too. I really think this will help a lot of people ship their apps faster and easier. In my opinion, this is the only drawback of Kinde otherwise you guys have made a dope product 😃
10 comments
S
D
D
DisamDev
·

Logout url

Why when I log out it takes me to my custom domain log out page and not to the one I have in the allowed in the dashboard/the one I have in the env?
12 comments
I
D
When you have configured the screens in dark mode, the INVALID CALLBACK URL error has the card in white, which I think is not correct, and the gray text, which is not seen, and under the underlined text is not seen well either.
9 comments
D
C
f
f6
·

linked auth

{
id: 'Kp_.....',
email: undefined,
family_name: 'falah',
given_name: 'Mohammed',
picture: 'https://.....',
username: undefined,
phone_number: undefined
}


why does linkedIn does not return the email
35 comments
f
C
Is it possible to configure the 404 page? When I go to the main page of my custom domain I get the text: “Uh sorry. You were never meant to see this page. Try navigating back to the sign-in screen or business homepage."

And I would not like to get the text of the business page or could be customized to redirect to the main domain or another subdomain.

And another thing, is it possible to add in the sign up page a box “By registering you accept the terms and conditions” and put a link to them.
5 comments
O
D
8 comments
D
I
When I am in production and I click on the loginlink it takes to the API url and says not found.
3 comments
O
D
Hi all,

Just started trying to swap over to Kinde, having followed the "SvelteKit SDK" page in the docs and am seeing
Plain Text
Invalid KINDE_REDIRECT_URL: Invalid URL
code: 'ERR_INVALID_URL',
input: 'undefined/oauth2/auth'

I'm pretty sure my configuration/env just flat-out isn't recognised 😦

I've more or less copied things 1 for 1, and double checked all variables configured in my .env, and within the Kinde dashboard.
There's no extra spaces, no missing slashes in the protocol, nada.

Two aside notes...
  1. I use a PUBLIC_ prefix for my variables and I can't see a way to make that compatible with Kinde (Yes, I have experimented with and without this before raising this thread)
  2. Step 1 in the docs say "In Kinde, go to Settings > Applications and then navigate to the relevant frontend app or backend app.", but I couldn't find the secret key for the frontend app, which is needed for the "Configure your app" step. I'm also not entirely sure which is applicable for sveltekit. Either way - I have tried both the front and back-end apps for configuration Kinde and had no luck.
17 comments
S
g
O
As per the documentation (https://docs.kinde.com/build/tokens/verifying-json-web-tokens/#json-web-key), to validate JWTs on the back end I am fetching the JWKS from https://<your_subdomain>.kinde.com/.well-known/jwks. This works. However, to avoid having to make an HTTP request for every JWT decode, I am caching the keys. I would like to know how often these keys are rotated?

There is no cache-control header present in the response, and I can't find anything in the docs to suggest how long I can safely cache these values.

Thanks!
4 comments
I
O
r
Hello, on our production environment, we receive this 500 error message when trying to login:

Server experienced an error it couldn't recover from.
Error code b253c26ee8f749f6bab0cdb8fe4bfe3f

The url is /auth/cx/_:nav&m:start_authentication_pipeline&lid:1fc2e992-6bed-4438-a8b1-a3490695b795
We have not made any changes to our web application. Can anyone help?

Also Kinde admin portal url returns a 500 error
2 comments
C
m
I'm following along https://kinde.com/blog/engineering/kinde-with-supabase/ but my application is client side (no server side rendering.) Is it sill possible to use Kinde in this setup? It would be great if I could authenticate with Kinde and then just have the Supabase client work.

Any tips/suggestions would be appreciated.
7 comments
O
k
Hi there, I'm working on a project where we have a NextJS frontend which handles login and register on the frontend using the super easy Next SDK. The problem starts to form when we introduce the API that we need to make calls to.

I want to pass the JWT from the frontend over to the API and am doing so in the authorization header. From here I can use the JWK to verify the token, BUT I can't seem to figure out how to fetch additional data from Kinde such as roles, etc.

So my question is, in order to be able to fetch said additional data, would I need to handle all auth on the API side (Preferably do not want to do this 😭) or is there some sort of python SDK I can use to authorize, get roles, and get permissions on the API side using the JWT from the frontend?
48 comments
O
S
t
I
So this issue is occuring when I have my domain proxied through cloudflare. I have local, staging and production setup and I made sure to test with staging to see that turning proxy on and off was the issue.

I get "Unexpected Server Error" when I try to login with a gmail account and the console shows "Failed to load resource: the server responded with a status of 500 ()"

Is there more network request information, or info on my cloudflare setup I can share that would help us figure out why this is happening?
1 comment
C
I am currently integrating Kinde with a Next.js application using the App Router. In my application, when a user logs in and successfully completes a payment transaction, I would like to set new properties for the user as paid user. However, I am encountering an issue when attempting to refresh the ID token using the method getKindeServerSession().refreshTokens();. It seems I am unable to fetch a new ID token after updating the user's properties.

Could you please provide guidance on how to resolve this issue or recommend an alternative approach for refreshing the ID token in this context?

Thank you!
14 comments
A
A
l
Hi, I've been a happy customer for a while.
Since last week I've had complaints from users - see the screenshot.

At first I couldnt replicate it myself - and now I cant seem to authenticate at all.
Consistently seeing the "Something went wrong when we tried to authenticate you, and we can’t offer a quick way out" error.
How can I debug this?

FYI all the redirect and login URL are correctly setup.
I've tested on multiple browsers - with and without clearing cookies etc.
Also note - I considered that this might be some hidden usage cap or something like that and I upgraded our account. But that hasnt had any effect so far.

I cant seem to login at all...
Help would be greatly appreciated 🙂
11 comments
C
2
I
F
Hello, I am having difficulty with setting up a custom email sender using Office 365/Outlook. I have been successful in getting SMTP setup in other applicationn. However, some reason I cannot get it to work with Kinde. I continue to receive a 504 error whenever I test send an email.

I was successful with other applications using the following SMTP servers

smtp-mail.outlook.com
smtp.office365.com

Thank you very much in advance!
12 comments
O
H
l