calher99
KKinde
•Created by calher99 on 2/17/2025 in #💻┃support
Custom param missing from callback using authUrlParams in Kinde Next.js
Hi! I’m using @kinde-oss/kinde-auth-nextjs in Next.js and trying to pass a custom invite param. Here’s my file structure and setup:
ENV: KINDE_POST_LOGIN_REDIRECT_URL=http://localhost:3000/api/auth/callback
Login code (page.tsx): src/app/login/page.tsx
<LoginLink
authUrlParams={{
invite: "myCustomInviteToken123",
}}
>
<Button>Sign in</Button>
</LoginLink>
callback (route.ts): /src/app/api/auth/callback/route.ts
export async function GET(req: NextRequest) {
const { searchParams } = new URL(req.url);
const inviteToken = searchParams.get("invite");
console.log("Invite token is:", inviteToken);
//shows "null"
...
}
Any idea why invite doesn’t appear in the callback URL? Thanks!!4 replies