I seems to me that I need to generate a new session cookie when I extend the session and return that to our UI. Does this sound like a sensible route, or have I missed a trick in Kratos that will do something similar for me?
m
magnificent-energy-493
05/07/2024, 1:22 PM
Hello @some-bear-63847
That sounds sensible and as far as I can see that is the correct way to solve it.
s
some-bear-63847
05/08/2024, 10:12 AM
great, thanks. Sometimes its hard to know weather a particular approach is elegant or ugly (e.g. Duffs device :-)
some-bear-63847
05/29/2024, 5:10 PM
To reply to myself, The correct technique is to copy the kratos_session cookie generated in response to my toSession() call. This cookie is only returned after an extend session request is made. This new cookie has a valid kratos session value and correct expiry dates.
m
magnificent-energy-493
05/30/2024, 9:40 AM
Thanks for sharing! I made a note to add to the docs/bot