MaartenDesnouck / google-apps-script

🛠 Manage and deploy your Google Apps Script projects using the command line
https://www.npmjs.com/package/google-apps-script
MIT License
117 stars 13 forks source link

Changing accounts #112

Open MikeWarren2014 opened 6 years ago

MikeWarren2014 commented 6 years ago

I have project under my personal account, and just obtained a GSuite account about a month ago. I have a container-bound script under that new account, and instead of subjecting myself to the agony of writing all the code in that awkward code editor online, I wish to write it locally via Visual Studio Code, via this tool. I am signed into both accounts in the browser. How do I, at the command line, switch from my personal account to the GSuite account? (Plain old gas auth isn't giving me the option to switch accounts.)

garymcm commented 6 years ago

The command is gas auth -f which will spawn a browser and you will be able to switch accounts. Remember after authenticating, you'll need to link to the project under that account.

MaartenDesnouck commented 6 years ago

gas auth -f indeed give you the option but I'm also thinking about making it possible to be logged into multiple accounts at the same time, so you don't need to switch account at all