apollographql / rover

✨🤖 🐶 The CLI for Apollo GraphOS
https://rover.apollo.dev
Other
402 stars 83 forks source link

`rover login` #289

Open lrlna opened 3 years ago

JakeDawkins commented 3 years ago

What is this command for? I don't remember discussing it

EverlastingBugstopper commented 3 years ago

This would be an alternative to rover config auth where it would open the browser and you could log in with the Studio UI instead of traversing through the UI to find an API key somewhere. We'd probably want a rover config login command instead of just rover login

JakeDawkins commented 3 years ago

Ahh that makes sense. My only concern is that the two commands' naming would be pretty confusing, and not obvious at first glance what's going on.

Would it be reasonable to expand the existing auth command instead? Like:

$ rover config auth

Would you like to paste an API key or open your browser?
> Open Browser and Log In
Paste my Studio API Key

Opening studio.apollographql.com in your browser. Continue logging in there... 
EverlastingBugstopper commented 3 years ago

mmm - probably! don't think that would count as a breaking change unless folks somehow scripted something to work with an interactive command like that...

JakeDawkins commented 3 years ago

I don't think so either. And if we're doing this in GA, I especially don't mind the risk of breaking someone's scripted auth workflow (whatever that could even be)

abernix commented 3 years ago

Perhaps this should use OAuth!

EverlastingBugstopper commented 2 years ago

fly.io has a great example of this with flyctl auth login