NEXT_PUBLIC_KINDE_AUTH_API_PATH and kinde middleware

I learned from the kinde ai that NEXT_PUBLIC_KINDE_AUTH_API_PATH helps kinde work in situations where I use basePath in my next.js project. However, it seems that if I use the kinde middleware approach, that doesn't work, as the redirect after the login does not make use of that variable. Suggestions on how to find a workaround for that?
6 Replies
Zaki
Zaki4mo ago
Hi, Thanks for reaching out! Could you try using the KINDE_AUTH_API_PATH variable instead? Let me know if you need further clarification or assistance—I’d be happy to help!
arundquist
arundquistOP3mo ago
I tried it with that and I have the same problem. That variable does let me do page level authentication with the correct redirect (just as the NEXT_PUBLIC_KINDE_AUTH_API_PATH variable does, so thanks for that), but the middleware approach still doesn't include the basePath.
Zaki
Zaki3mo ago
I see. Could you try passing the apiPath directly into useKindeBrowserClient? Hi @arundquist, Have you had a chance to try the suggested changes? If you're still encountering issues or have any questions, feel free to let me know, and I'll be happy to assist further. Otherwise I'll go ahead and close the request
arundquist
arundquistOP3mo ago
sorry for the delay. I didn't think the middleware used the browser client so I'm not sure how to do what you suggest
Zaki
Zaki3mo ago
Hi @arundquist, sorry for the delay! I'll check with my team and get back to you shortly.
Claire Mahoney
Claire Mahoney2mo ago
Hi, could you please check it now and let me know if the issue still persists? Also, please keep in mind that upgrading to the latest version might help resolve any potential issues.

Did you find this page helpful?