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
Hey @DavidF9265 can you please share some code snippet ?
@IkiTg07 This is the code and some configuration screenshots.
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 "/" ?
Yes, you're right. To '/'
The version is: 2.3.4
"@kinde-oss/kinde-auth-nextjs": "^2.3.4",
what happen when you don't add postLogoutRedirectURL ?
The same
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")
Ok let me ask the team for you guys
@DavidF9265 could you update to "@Kinde-oss/kinde-auth-nextjs": "^2.3.6" as see if the issue still remains for you?
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 tabI 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 debugYes, it works correctly now.