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

feat: prompt before opening web-login URL when performing login/adduser #4960

Merged
merged 9 commits into from
Jun 22, 2022

Conversation

jumoel
Copy link
Contributor

@jumoel jumoel commented May 31, 2022

Why

We want the npm CLI to prompt and wait before opening a URL.
The flow should be dependent on the authorization result and should continue without user input if the authorization is completed.

What

  • Add a utility that opens an URL after a prompt
  • The prompt is cancellable by an EventEmitter
  • Switch login/adduser to use the new prompt when applicable

The new openerPromise API is backwards compatible with the old one (it only adds new parameters), so it will work even without the changes from npm-profile.

Without the changes from npm-profile, the user will always have to press Enter to continue the flow.

References

@jumoel jumoel requested a review from a team as a code owner May 31, 2022 12:20
@jumoel jumoel changed the title feat: Prompt before opening web-login URL when performing login/adduser feat: prompt before opening web-login URL when performing login/adduser May 31, 2022
@jumoel jumoel changed the title feat: prompt before opening web-login URL when performing login/adduser feat: prompt before opening web-login URL when performing login/adduser May 31, 2022
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.

3 participants