I seems to me that I need to generate a new sessio...
# ory-selfhosting
s
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
Hello @some-bear-63847 That sounds sensible and as far as I can see that is the correct way to solve it.
s
great, thanks. Sometimes its hard to know weather a particular approach is elegant or ugly (e.g. Duffs device :-)
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
Thanks for sharing! I made a note to add to the docs/bot