Optional
apiThe API hostname for requests. Should usually be left undefined, but can be set if using custom cname for API domain.
Optional
loginLogin method to use for the studio. Can be one of:
dual
(default) - attempt to use cookies where possible, falling back to
storing authentication token in localStorage
otherwisecookie
- explicitly disable localStorage
method, relying only on cookies. May fail due
to cookies being treated as third-party cookies in some browsers, thus the default is dual
.token
- explicitly disable cookies, relying only on localStorage
methodOptional
modeWhether to append the providers specified in providers
with the default providers from the
API, or replace the default providers with the ones specified.
Optional
providersArray of authentication providers to use, or a function that takes an array of default authentication providers (fetched from the Sanity API) and should return a new list of providers. This can be used to selectively replace, add or remove providers from the list of choices.
If a static array of providers is provided, the mode
property is taken into account
when determining what to do with it - append
will append the providers to the default set
of providers, while replace
will replace the default providers with the ones specified.
If not set, the default providers will be used.
Optional
redirectIf true, the "Choose login provider" (eg "Google, "GitHub", "E-mail/password") screen
will be skipped if only a single provider is configured in the providers
array -
instead it will redirect unauthenticated users straight to the authentication URL.
Authentication options