Rigenerate cookies/sessionid

Hi all! I’d like to write a service accessible only to authenticated users that rigenerates cookies (and so the sessionid) for the current authenticated user (more or less like the login does, but without re-enter the credentials since the user is already authenticated).
So I’m wondering what is the function I have to call to create the new cookies and session id.

Thank you!

Not sure what you mean, AuthFeature.GenerateNewSessionCookiesOnAuthentication is enabled by default and will generate new Session Cookies each time a User Authenticates.

I’m not sure what you intend to use it for but there is an IRequest.GenerateNewSessionCookies(IAuthSession) API that will generate new session cookies for the current request and populate the session Id, but I’d be careful about using it, you’ll also need to save the session again so it’s saved against the new session.Id