-
Notifications
You must be signed in to change notification settings - Fork 10.3k
wip(gatsby-cli): add login, logout, whoami commands #28251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
mfrachet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like your coding style, code is self-explanatory and easy to figure out 👍🏻 . I'm nit picky on tiny things but feel free to ignore them if they don't make sense :)
mxstbr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fantastic! 💯
Description
This adds the ability to log in to Gatsby Cloud from the CLI. The 3 following commands are hidden behind an experimental flag
GATSBY_EXPERIMENTAL_CLOUD_CLIthat when set enables the commands:gatsby login- saves an access token after a login to the config storegatsby logout- removes the tokengatsby whoami- hits the Gatsby Cloud API to return the name of the currentUserNote: this gif is a little inaccurate as it shows a lot of debug level details like the polling in the CLI which has been removed.
The bajillion identical commits are me fighting TypeScript to pass our pre commit linting haha
Good luck stealing my token you hackers because this is all on my local machine ;)