kinde-oss / kinde-auth-nextjs

Kinde NextJS SDK - authentication for server rendered apps
https://docs.kinde.com/developer-tools/sdks/backend/nextjs-sdk/
MIT License
157 stars 24 forks source link

Login issue with nextjs #213

Closed waqaspassu closed 1 month ago

waqaspassu commented 1 month ago

Prerequisites

Describe the issue

http://localhost:3000/api/auth/login When I login. It is saying that "This page could not be found."

I have created app/api/auth/[kindeAuth]/route.js folder and pasted the following code

import {handleAuth} from "@kinde-oss/kinde-auth-nextjs/server"; export const GET = handleAuth();

Library URL

https://github.com/kinde-oss/kinde-auth-nextjs

Library version

^2.3.8

Operating system(s)

Windows

Operating system version(s)

Windows 10

Further environment details

KINDE_CLIENT_ID=2437a170c057431382bd5cbd08eadd2c KINDE_CLIENT_SECRET=xH3Garvht0z5DrijQye6Cq8DEblRjP3eXoJFL5xbpZaT24SSe KINDE_ISSUER_URL=https://ecomcobra1.kinde.com KINDE_SITE_URL=http://localhost:3000 KINDE_POST_LOGOUT_REDIRECT_URL=http://localhost:3000 KINDE_POST_LOGIN_REDIRECT_URL=http://localhost:3000/dashboard

Reproducible test case URL

No response

Additional information

No response

waqaspassu commented 1 month ago

On production it is fine. Locally it is not working

waqaspassu commented 1 month ago

I have deleted all my kinde business and create new business. It is woking now.