Sanity logosanity.ioAll Systems Operational© Sanity 2026
Change Site Theme
Sanity logo

Documentation

    • Overview
    • Platform introduction
    • Next.js quickstart
    • Nuxt.js quickstart
    • Astro quickstart
    • React Router quickstart
    • Studio quickstart
    • Build with AI
    • Content Lake
    • Functions
    • APIs and SDKs
    • Agent Actions
    • Visual Editing
    • Blueprints
    • Platform management
    • Dashboard
    • Studio
    • Canvas
    • Media Library
    • App SDK
    • Content Agent
    • HTTP API
    • CLI
    • Libraries
    • Specifications
    • Changelog
    • User guides
    • Developer guides
    • Courses and certifications
    • Join the community
    • Templates
Studio
Overview

  • Setup and development

    Installation
    Project Structure
    Development
    Hosting and deployment
    Embedding Sanity Studio
    Upgrading Sanity Studio
    Environment Variables
    Using TypeScript in Sanity Studio
    Understanding the latest version of Sanity

  • Configuration

    Introduction
    Workspaces
    Schema and forms
    Conditional fields
    Field Groups
    List Previews
    Connected Content
    Validation
    Initial Value Templates
    Cross Dataset References
    Sort Orders
    Visual editing and preview
    Incoming reference decoration

  • Block Content (Portable Text)

    Introduction
    Configure the Portable Text Editor
    Customize the Portable Text Editor
    Create a Portable Text behavior plugin
    Add Portable Text Editor plugins to Studio
    Common patterns
    Standalone Portable Text Editor

  • Studio customization

    Introduction
    Custom component for Sanity Studio
    Custom authentication
    Custom asset sources
    Diff components
    Form Components
    How form paths work
    Icons
    Favicons
    Localizing Sanity Studio
    New Document Options
    Studio Components
    Studio search configuration
    Focus and UI state in custom inputs
    Real-time safe patches for input components
    Sanity UI
    Studio Tools
    Create a custom Studio tool
    Tools cheat sheet
    Theming

  • Workflows

    The Dashboard tool for Sanity Studio
    Add widgets to dashboard
    Document actions
    Release Actions
    Custom document badges
    Localization
    Content Releases Configuration
    Enable and configure Comments
    Configuring Tasks
    Scheduled drafts
    Scheduled publishing (deprecated)
    Manage notifications

  • Structure builder

    Introduction
    Get started with Structure Builder API
    Override default list views
    Create a link to a single edit page in your main document type list
    Manually group items in a pane
    Dynamically group list items with a GROQ filter
    Create custom document views with Structure Builder
    Cheat sheet
    Structure tool
    Reference

  • Plugins

    Introduction
    Installing and configuring plugins
    Developing plugins
    Publishing plugins
    Internationalizing plugins
    Reference
    Official plugins repo

  • AI Assist

    Installation
    Translation
    Custom field actions
    Field action patterns

  • User guides

    Comments
    Task
    Copy and paste fields
    Compare document versions
    Content Releases
    Scheduled drafts
    View incoming references
    Common keyboard shortcuts

  • Studio schema reference

    Studio schema configuration
    Array
    Block
    Boolean
    Cross Dataset Reference
    Date
    Datetime
    Document
    File
    Geopoint
    Global Document Reference
    Image
    Number
    Object
    Reference
    Slug
    Span
    String
    Text
    URL

  • Studio reference

    Asset Source
    Configuration
    Document
    Document Badges
    Document Actions
    Form
    Form Components
    Hooks
    Structure tool
    Studio Components Reference
    Tools
    Initial Value Templates
    Studio API reference

On this page

Previous

Custom component for Sanity Studio

Next

Custom asset sources

Was this page helpful?

On this page

  • SAML single-sign on (SSO)
  • SSO and Media Library
StudioLast updated January 9, 2026

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 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 studio config.
  auth: {
    providers: [
      {
        name: 'sanity',
        title: 'Email / Password',
        url: 'https://api.sanity.io/v1/auth/login/sanity',
      },
    ],
  },
})
import {defineConfig} from 'sanity'

export default defineConfig({
  // ... The rest of the studio config.
  auth: {
    providers: (prev) => [...prev,
      {
        name: 'newProvider',
        title: 'Email / Password',
        url: 'https://url.to.other.login',
      }
    ]
  },
})

Gotcha

In studio versions prior to v3.15.0 the recommended way to configure custom authentication included using the createAuthConfig helper method. This approach will still work, but is considered deprecated in favor of the more straight forward new method.

SAML single-sign on (SSO)

This is a paid feature

This feature is available as an addon for the Growth plan.

When you configure SSO with SAML, you're receive a code snippet to help you configure the custom authentication section if your Sanity config.

SAML and SSO guides

Setting up Single Sign-On with SAML

This article will take you through the process of setting up SAML (Security Assertion Markup Language) SSO (Single Sign-on) for your organization.

Set up SSO authentication with SAML and JumpCloud

Implement single-sign on for Sanity with JumpCloud

Set up SSO authentication with SAML and PingIdentity

Implement single-sign on for Sanity with PingIdentity SAML

Set up SSO authentication with SAML and Azure/Entra ID

Implement single sign-on authentication with the SAML protocol and Microsoft Azure AD/ Entra ID as the identity provider.

SSO and Media Library

If you use a self-hosted Studio and use SSO, you may run into issues accessing Media Library.

To work around this, use one of the following options:

  • If your provider supports it, you can use a token-based login method by setting auth.loginMethod: 'token'.
  • Log in to the dashboard prior to accessing Media Library.

We're working to support other methods in the future.

  • Article
  • Changelog
import {defineConfig} from 'sanity'

export default defineConfig({
  // ... The rest of the studio config.
  auth: {
    providers: [
      {
        name: 'sanity',
        title: 'Email / Password',
        url: 'https://api.sanity.io/v1/auth/login/sanity',
      },
    ],
  },
})
import {defineConfig} from 'sanity'

export default defineConfig({
  // ... The rest of the studio config.
  auth: {
    providers: (prev) => [...prev,
      {
        name: 'newProvider',
        title: 'Email / Password',
        url: 'https://url.to.other.login',
      }
    ]
  },
})