Sanity Library Reference Docs
    Preparing search index...

    Type Alias ResolvedAuth

    ResolvedAuth:
        | { token: string; withCredentials?: undefined }
        | { token?: undefined; withCredentials: true }
        | { token?: undefined; withCredentials?: undefined }

    What client.getAuth() resolves to: the current Auth as an object, so it can be destructured. Anonymous access is {}; the two credential forms are the same objects the auth observable emits.