sanity icon indicating copy to clipboard operation
sanity copied to clipboard

Switch between multiple accounts when using CLI

Open johnnypea opened this issue 5 years ago β€’ 5 comments

I would like to switch between multiple Sanity.io accounts.

Something like sanity switch ACCOUNT would be useful. We can store multiple login tokens and tag/name them.

It's not very practical to log in every time I need to work on different project.

johnnypea avatar Mar 04 '20 07:03 johnnypea

Thank you for submitting! This is a good idea and definitely sounds like something that will improve the DX πŸ‘ We'll look into it 😊

vicmeow avatar Mar 05 '20 07:03 vicmeow

@vicbergquist Is there a way to change account at all? Like manually deleting it in some config and running init again to authenticate?

milosmalic avatar Mar 05 '20 10:03 milosmalic

@vicbergquist Is there a way to change account at all? Like manually deleting it in some config and running init again to authenticate?

Found sanity login command, forget about the question :-)

milosmalic avatar Mar 05 '20 11:03 milosmalic

Hello πŸ– Any updates on this feature?

It would really help the developer flow being able to switch accounts faster or being able to have multiple accounts logged in. Currently working on projects from multiple accounts is a pain πŸ˜…

Thanks in advance

jnrebelo avatar Oct 18 '21 15:10 jnrebelo

@milosmalic works for me thanks

AyourElwazani97 avatar Sep 02 '22 22:09 AyourElwazani97

Ran across this while learning about Sanity and had an issue when trying to build a project in the CLI and was getting an error regarding not being added when running the command:

sanity start

and after clicking the URL: http://localhost:3333

In the terminal, after the global installation of:

npm install -g @sanity/cli

If you've performed the init command:

sanity init

and you want to use a different account, in the terminal you can logout:

sanity logout 

then log into your other account.

codingChewie avatar Sep 27 '22 13:09 codingChewie

Hi!

We are currently working on improving our workflows and follow-up on our open GitHub repository. In that work, we have decided to close most issues older than the release of Sanity Studio v3.

We value your feedback, so if this issue is still important to you and relevant for Sanity Studio v3, please search for relevant open issues. If you can’t find any, open a new one and link to relevant comments in this thread. For questions about how to do something, please post them in the slack community.

kmelve avatar Jan 11 '23 21:01 kmelve

Hi Have same problem want to use client sanity and when y run localhost:/3333 says not authorized but shows the client account that allows me to access from Chrome what happens ??? Thanks

dardoschuster avatar Feb 01 '24 19:02 dardoschuster

Sorry I am using Github

dardoschuster avatar Feb 01 '24 19:02 dardoschuster