swift
swift
KKinde
Created by swift on 3/12/2025 in #💻┃support
Nextjs middleware post login redirect not working
Hi, yes I had tried this variation. I wanted to be sure it wasn't my problem but a bug in the kinde middleware. I made my own now as a work around now and will watch your releases and test the new versions in case you fix the middleware issue.
13 replies
KKinde
Created by swift on 3/12/2025 in #💻┃support
Nextjs middleware post login redirect not working
😔
13 replies
KKinde
Created by swift on 3/12/2025 in #💻┃support
Nextjs middleware post login redirect not working
I've tried many different variations but always get the same result. would anyone from kinde be able to provide an example of how you use middleware with nextjs 14? Or if middleware does not work, how you perform the token refresh without it?
13 replies
KKinde
Created by swift on 3/12/2025 in #💻┃support
Nextjs middleware post login redirect not working
ok thanks. And where should that full URL go when using the middleware? I already tried: KINDE_SITE_URL=http://localhost:3001 KINDE_POST_LOGOUT_REDIRECT_URL=http://localhost:3001 KINDE_POST_LOGIN_REDIRECT_URL=http://localhost:3001 In the env file. The docs show these options: isReturnToCurrentPage - redirect the user back to the page they were trying to access loginPage - define the path of the login page (where the users are redirected to when not authenticated) publicPaths - define the public paths isAuthorized - define the criteria for authorization should I be doing something in the middleware function itself? Do you have a link or could you provide an example?
13 replies
KKinde
Created by swift on 3/12/2025 in #💻┃support
Nextjs middleware post login redirect not working
I would rather avoid updating to nextjs 15 for now. I tried recently and a number of the packages that I use had issues. It makes more sense for me to wait until they have all caught up. Is what I described a known issue for you and nextjs 14?
13 replies
KKinde
Created by swift on 3/12/2025 in #💻┃support
Nextjs middleware post login redirect not working
It is not enabled. I assume it shouldn't be, I'm not using Hasura
13 replies