Sanity Library Reference Docs
    Preparing search index...
    • Returns the session token for the reading connection, or null while signed out.

      Suspends until Dashboard publishes the token.

      Returns string | null

      function AuthToken() {
      const token = useAuthToken()
      return <span>{token ?? 'Signed out'}</span>
      }