Third-party SSO logins now work without cookies in Sanity Studio
Yes, you're right that SSO is the reason it doesn't work! The cookieless login feature introduced in v2.28.0 works for regular Sanity logins, but there was indeed an issue with third-party SSO implementations that needed a separate fix.
Based on the thread you're referencing, cookieless logins do work for SSO, but it requires a specific implementation detail that might not be well-documented yet.
The solution: Your SSO implementation needs to redirect back to the studio with the session ID (SID) as a hash parameter instead of relying on cookies. In other words, after authentication, the redirect URL should include #sid=foo at the end.
Here's an example commit from Sanity's own community studio that shows how to implement this change.
The key change is modifying your SSO callback to append the session ID as a hash parameter rather than setting it as a cookie. This allows Safari and other browsers that block third-party cookies to still authenticate successfully.
If you're using the newer SAML SSO setup (not the legacy third-party login), you'll want to make sure your identity provider is configured to pass the SID in this way. If you're still having issues after making this change, I'd recommend reaching out to Sanity support as they can help debug your specific SSO configuration.
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.