DJKnaeckebrot
Explore posts from serversKKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
I just saw I might can add another check in the else if for the url not being null tho
66 replies
KKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
Hey @Dave - Kinde sorry for the ping.
I have made some changes to the SDK so it adds the /api/auth/postlogout functionallity.
I was just wondering if this looks good to you guys before I open the PR
I added a remove of the sessionItem before the redirect cause otherwise if you only use logout it will keep using that cookie (atleast for me) 😄
66 replies
KKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
I like the 3. solution as it seems to be the best of both worlds 🙂
66 replies
KKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
thanks for your help to both of you!
66 replies
KKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
+1
66 replies
KKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
I had to add the KINDE_SITE_URL as I use a reverse proxy and the provided code was putting localhost:4001 instead of my domain 😄 Otherwise its working now!
For reference if anyone ever needs it I'll leave the code for the
/api/logout/
route
66 replies
KKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
Thanks for this detailed response!
I'll try to get this implemented and will let you know!
Eitherway I am just wondering if this SDK still should be able to do this without making this "workaround" with the custom logout page? If so I might can try to dig deeper on why it wont pass/use the param 🙂
66 replies
KKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
Yeah i set those urls 😄 Was the first thing I checked haha as I initially was landing on the kinde default page so I added all pages and even with the searchParams in the URL 😄
66 replies
KKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
Little Update:
I have checked the typescipt SDK as this gets referenced:
types.d.ts:
Seems as if for the types the options are missing.
Checking the
src/routerClients/AppRouterClient.js
it references the typescript SDK with the this.kindeClient call:
While the src/handlers/logout.js
call sets up the authURL by using:
Console logging the authUrl leads to : https://identity.teamsynix.org/logout?redirect=http://localhost:3000/login
while authUrlParams: Object.fromEntries(routerClient.searchParams)
returns : {"post_logout_redirect_url":"/login?type=bewerben"}
Tbh I dont rly know if this error is within the typescript SDK or the NextJS SDK..66 replies
KKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
hahaha lol!
66 replies
KKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
this basically always uses my set default logout url and not the one provided in the URL if I understood it right
66 replies
KKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
oh yeah, but I am not too sure if you get back to the callback on logout
66 replies
KKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
yeah guess I'll need to wait for one of the kinde guys to have a look. I'lL might do some more digging but I am kinda stuck rn 😄 Thanks for your help so far tho, much appretiated!
66 replies
KKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
yep same for me 😦
66 replies
KKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
No unfortunately not.
Im currently following a "hint" that in the SessionManger it only has the post login url as cookie but not the post logout url
https://github.com/kinde-oss/kinde-auth-nextjs/blob/059547d6b6eb88b808aab04c653a380ecdb30ab3/src/session/sessionManager.js#L23
I will check if adding the post logout url will change anything otherwise the kinde guys need to have a view
66 replies
KKinde
•Created by DJKnaeckebrot on 2/26/2024 in #💻┃support
Post Logout Redirect Parameter
I can see that it adds the parameter to the url but i haven’t found out where this logic is getting processed so where the actual redirect happens. For me it seems that the issue might be there
66 replies