Callback function invoked when Roblox rotates a .ROBLOSECURITY cookie.
Use this to persist the new cookie value to your storage (env vars, database, etc.).
event - Contains the old cookie, new cookie, and pool index
void or Promise
configureServer({ cookies:process.env.ROBLOX_COOKIE, onCookieRefresh:async (event) => { // Update your environment variable or database awaitupdateDatabaseCookie(event.newCookie); console.log('Cookie rotated! Old cookie index:', event.poolIndex); } });
Callback function invoked when Roblox rotates a .ROBLOSECURITY cookie. Use this to persist the new cookie value to your storage (env vars, database, etc.).
event - Contains the old cookie, new cookie, and pool index void or Promise