Skip to content
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

Browserless login #33

Merged
merged 5 commits into from
Oct 20, 2020
Merged

Browserless login #33

merged 5 commits into from
Oct 20, 2020

Conversation

coffee-cup
Copy link
Contributor

Ability to login to Railway when the CLI cannot open a browser directly

See https://github.com/railwayapp/mono/pull/253 for an explanation of how this works

@linear
Copy link

linear bot commented Oct 19, 2020

RAIL-398 CLI Non-visual Login

Works in codespaces

Explore what other CLIs are doing

Do something like that ✅

- CLI calls railway gets unique login URL

- user goes to URL, logins in if necessary, and presses button to give access to the CLI (stripe does this by showing a random set of words and telling the user to verify the words match the words in the CLI)

- if user verifies CLI, the logged in user will be set as user associated with that login URL - when the CLI is polling it checks if any user has been verified for that user. When one is verified a user token is sent back. CLI keeps polling until a user verifies or cancels the process.

Copy link
Contributor

@JakeCooper JakeCooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Only thing I'd recommend is, to include a message on the browser based loading screen like "Browser didn't open? Try rerunning with --browserless"

IDK up to you. I was stoked about the idea but midway through typing it I was like "ehh"

@coffee-cup
Copy link
Contributor Author

I think if the browser doesn't open it will error and we will go through the browserless flow anyway. I'll probably not add that message just because it feels less magical ✨

@coffee-cup coffee-cup merged commit 1992033 into master Oct 20, 2020
@coffee-cup coffee-cup deleted the j/rail-398-cli-non-visual-login branch October 20, 2020 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants