OptionalapiThe API hostname for requests. Usually leave this undefined, but it can be set if using a custom domain or CNAME for the API endpoint.
OptionalcallbackA callback URL for your application.
If none is provided, the auth API will redirect back to the current location (location.href).
When handling callbacks, this URL's pathname is checked to ensure it matches the callback.
OptionalclientFactory function to create a SanityClient instance. Defaults to the standard Sanity client factory if not provided.
OptionalinitialThe initial location href to use when handling auth callbacks. Defaults to the current window location if available.
OptionalprovidersCustom authentication providers to use instead of or in addition to the default ones. Can be an array of providers or a function that takes the default providers and returns a modified array or a Promise resolving to one.
OptionalstorageStorage implementation to persist authentication state.
Defaults to localStorage if available.
OptionaltokenA static authentication token to use instead of handling the OAuth flow. When provided, the auth store will remain in a logged-in state with this token, ignoring any storage or callback handling.
Configuration options for creating an auth store.