Transfer ownership broke Sanity Studio login - "unknown user" error
This is a tricky situation, but the good news is you eventually got it working! Based on the similar case I found in Sanity's community answers, this is primarily a browser cookie/cached authentication issue that happened because of the complex account transfer process you went through.
Here's what likely happened: When you switched from a GitHub-authenticated account to an email-based account (even with the same email), Sanity treats these as completely different user identities. During your transfer process, some stale authentication data got cached in Chrome that was pointing to your old GitHub-based identity, which no longer exists. This is why you were seeing the 404 error for https://covwi5zn.api.sanity.io/v2021-06-07/users/me — the browser was sending old credentials for a user that doesn't have access to the project anymore.
How to fix the "unknown user" error:
1. Deep clean your browser data
As you discovered, the standard "clear cookies" isn't always enough. Chrome (and other browsers) can cache authentication data in places that don't show up in DevTools. Here's what to do:
- Go to Chrome Settings → Privacy and Security → Clear browsing data
- Select "All time" as the time range
- Check: Cookies, Cached images and files, and Site settings
- Important: Also search for "sanity" in the site data section and manually delete anything related to
sanity.ioorsanity.studio
2. Check your project access
Log into sanity.io/manage with your current email/password account and verify:
- You can see the project with ID
covwi5zn - Your current user account is listed as a member with Admin permissions
- If you can't see the project or aren't listed as a member, that's your root issue
3. If you're locked out completely
If your current account doesn't have access to the project in Manage, you'll need to contact Sanity support. Explain the account transfer sequence you went through. They can verify your ownership (via your Netlify deployments and local project files) and add your current account identity as an admin.
4. Try a different browser temporarily
As you found, Firefox worked when Chrome didn't. This confirms it's browser-specific cached data causing the issue.
Why this happened:
Sanity treats each authentication method as a separate user identity. Your user@example.com via GitHub and user@example.com via email/password are two completely different users in Sanity's system. When you transferred the project between accounts and deleted the intermediary accounts, you likely ended up with a project where the admin user ID doesn't match your current authenticated user ID.
The cookie/authentication issue is a known problem that Sanity has been working on, particularly related to third-party cookie handling in modern browsers.
Pro tip: For future reference, if you need to switch authentication methods, it's safer to add the new account as an admin first, verify access, then remove the old account — rather than doing transfers through intermediary accounts. This avoids getting into situations where you're locked out due to mismatched user identities.
Show original thread18 replies
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.