BetaOptional BetahandleCustom auth stores can implement a function that is designated to run when
the Studio loads (e.g. to trade a session ID for a token in cookie-less
mode). Within the Studio, this is called within the AuthBoundary.
Optional BetaLoginCustom auth stores are expected to implement a UI that initiates the user's
authentication. For the typical case in createAuthStore, this means
loading the providers and showing them as options to the user.
Optional BetalogoutCustom auth stores can implement a function that runs when the user logs out. The implementation is expected to remove all credentials both locally and on the server.
BetastateEmits AuthStates. This should update when the user's auth state changes.
E.g. After a login, a new AuthState could be emitted with a non-null
currentUser and authenticated: true
NOTE: all auth store implementations should emit on subscribe using
something like shareReplay(1) to ensure all new subscribers get an
AuthState value on subscribe
Optional BetatokenEmits auth tokens, or null if not configured to use them or they do not exist
The interface used by the Studio that produces a
SanityClientandCurrentUserthat gets passed to the resultingWorkspaces andSources.NOTE: This interface is primarily for internal use. Refer to
createAuthStoreinstead.Hidden