rozod
    Preparing search index...

    Type Alias CookieRefreshCallbackParam Returns Example

    CookieRefreshCallback: (event: CookieRefreshEvent) => void | Promise<void>

    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
    await updateDatabaseCookie(event.newCookie);
    console.log('Cookie rotated! Old cookie index:', event.poolIndex);
    }
    });

    Type declaration