Post logout url in NextjsSDK not redirecting

We are trying to achieve a post loggout redirect but cant make it work despite correctly setting envs. We are trying to achieve the redirect using LogoutLink component from the sdk
13 Replies
IkiTg07
IkiTg075w ago
Hey @DavidF9265 can you please share some code snippet ?
centauro
centauro5w ago
@IkiTg07 This is the code and some configuration screenshots.
No description
No description
No description
No description
No description
IkiTg07
IkiTg075w ago
What version of the sdk are you using ? So if i get it right when you click on your logout button it redirects you to "/logged-out" whereas you wanted the user to be redirected to "/" ?
centauro
centauro5w ago
Yes, you're right. To '/' The version is: 2.3.4 "@kinde-oss/kinde-auth-nextjs": "^2.3.4",
IkiTg07
IkiTg075w ago
what happen when you don't add postLogoutRedirectURL ?
centauro
centauro5w ago
The same
DavidF9265
DavidF92655w ago
seems to be something on kindes configuration side we tried using the same envs in another project without changing the code and faced the same issue (our bussiness is "Bien")
IkiTg07
IkiTg075w ago
Ok let me ask the team for you guys
onderay
onderay5w ago
@DavidF9265 could you update to "@Kinde-oss/kinde-auth-nextjs": "^2.3.6" as see if the issue still remains for you?
Peteswah
Peteswah5w ago
Hey @DavidF9265 sorry you're experiencing this, I managed to recreate the issue you were having, but it was quite flaky. When you test it again, would you be able to check and maybe send screenshots of the post_login_redirect_url set in your cookies and the logout requests from the network tab
Peteswah
Peteswah5w ago
No description
Peteswah
Peteswah5w ago
I believe setting KINDE_POST_LOGOUT_URL in your .env should be enough to get it to work, and setting in the LogoutLink is not necessary Also if I could get confirmation that the allowed logout redirect URLs are for the correct Application, that would be helpful info to help us debug
centauro
centauro4w ago
Yes, it works correctly now.
Want results from more Discord servers?
Add your server