Studio

Custom authentication

The Studio can be configured to use your own login solution rather than the standard ones by supplying the auth provider details in your studio configuration.

Custom authentication can be configured for the studio or individual workspaces. This is done by configuring the root config key auth for the studio or workspace with a configuration object that adheres to the AuthConfig signature.

import {defineConfig} from 'sanity'

export default defineConfig({
    ..., // The rest of the other studio config.
    auth: {
      projectId: 'dsf3cqw',
      dataset: 'production',
      mode: 'replace',
      redirectOnSingle: false,
      providers: [
        {
          name: 'enterprise-sso',
          title: 'My Enterprise SSO',
          url: 'https://my-enterprise.com/login',
        },
      ],
    },
  })

Gotcha

Was this page helpful?