Sanity Library Reference Docs
    Preparing search index...

    Variable refreshOAuthTokensConst

    refreshOAuthTokens: BoundStoreAction<
        AuthStoreState,
        [],
        Promise<Omit<OAuthTokens, "refreshToken"> | null>,
    > = ...

    Refreshes the OAuth tokens using the refresh_token grant. Concurrent callers share a single in-flight request. An unrecoverable failure (a 4xx rejecting the refresh token) clears the tokens and transitions to LOGGED_OUT; transient failures (network, 5xx, rate limits) leave the session intact and rethrow so the caller can retry. The resolved tokens omit the refresh token, which core retains internally for subsequent refreshes.