Issue with logging into Sanity.io account via Github method
I understand how frustrating this is! The "You are not authorized to access this studio" error when you're the project owner is a known issue that can happen for a few different reasons. Let me help you troubleshoot.
First, verify which account you're logged into:
The easiest way to check is using the Sanity CLI. Open your terminal and run:
sanity whoamiThis will show you which Sanity account you're currently authenticated with. If you're not logged in or logged into the wrong account, run:
sanity loginThen select GitHub as your login provider to ensure you're using the same account.
Check which projects you have access to:
Run this command to list all projects associated with your current login:
sanity projects listIf your project appears in this list, you have access. If it doesn't appear, that confirms there's an account mismatch issue.
Common causes of this issue:
Multiple accounts with different providers: Based on similar cases in the Sanity community, you should only be able to log in using one provider (GitHub, Google, or email/password). If you've logged in with different providers, you might have accidentally created separate Sanity accounts. Each provider creates a distinct account, even if they use the same email address.
GitHub email mismatch: If you have multiple email addresses associated with your GitHub account, GitHub might be authenticating you with a different email than the one originally used to create your Sanity project.
Organization vs personal account: Sometimes the project is owned by a Sanity organization rather than your personal account, and your personal account needs to be re-invited.
Try accessing Sanity Manage:
Can you log into sanity.io/manage? If so, go to your project and view the Members section. You should see your email with the GitHub logo on your avatar and a role of Administrator. If you don't see this, it confirms the account mismatch.
How to fix it:
Since you're the project owner, the best path forward is to contact Sanity support directly. They can:
- Verify which account owns the project
- Check if there are duplicate accounts under different emails
- Help merge accounts if needed
- Restore your access if it was accidentally removed
In the meantime:
If you have access to your project's code locally, you can verify your project ID by checking your sanity.config.ts or sanity.json file. When you contact support, provide them with:
- The project ID
- The email address shown in the error message
- The email/GitHub account you originally used to create the project
The VPN working intermittently is likely coincidental - Sanity doesn't typically block access based on location unless there are specific security policies in place for your organization.
Good luck, and support should be able to get you back in quickly!
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.