nextspace
    Preparing search index...

    Function ensureFreshToken

    • Ensures that the current access token is valid by attempting a refresh if needed. This should be called before critical operations like WebSocket authentication.

      Returns Promise<string | null>

      The current valid access token, or null if refresh failed