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

stripe login producing pairing code, but no URL. #1168

Open
pbanuru opened this issue Apr 10, 2024 · 5 comments
Open

stripe login producing pairing code, but no URL. #1168

pbanuru opened this issue Apr 10, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@pbanuru
Copy link

pbanuru commented Apr 10, 2024

Issue

I was trying to setup the stripe CLI to test out my site's functionality while in Stripe Test Mode, and tried to log in, but did not receive a URL when logging in. I was able to overcome it by using stripe login --interactive and providing my Test Secret Key as the API Key.

Expected Behavior

Receive a URL like this:

$ stripe login
Your pairing code is: enjoy-enough-outwit-win
This pairing code verifies your authentication with Stripe.
Press Enter to open the browser or visit https://dashboard.stripe.com/stripecli/confirm_auth?t=THQdJfL3x12udFkNorJL8OF1iFlN8Az1 (^C to quit)

Rather than hanging before receiving a URL:

$ stripe login
Your pairing code is: enjoy-enough-outwit-win
This pairing code verifies your authentication with Stripe.
[hangs]

Steps to reproduce

  1. Then follow the steps under the apt tab of
    https://docs.stripe.com/stripe-cli#install
$ curl -s https://packages.stripe.dev/api/security/keypair/stripe-cli-gpg/public | gpg --dearmor | sudo tee /usr/share/keyrings/stripe.gpg
$ echo "deb [signed-by=/usr/share/keyrings/stripe.gpg] https://packages.stripe.dev/stripe-cli-debian-local stable main" | sudo tee -a /etc/apt/sources.list.d/stripe.list
$ sudo apt update
$ sudo apt install stripe
  1. Then type stripe login in to the terminal.
$ stripe login

Environment

Ubuntu 22.04.2 LTS on WSL2
stripe version 1.19.4

@pbanuru pbanuru added the bug Something isn't working label Apr 10, 2024
@tomer-stripe
Copy link
Collaborator

Hey, thanks for the report! I wasn't able to reproduce this on Mac or Ubuntu (non-WSL2). I'll see if I can somehow get ahold of a system with WSL2 to try and reproduce this.

@pbanuru
Copy link
Author

pbanuru commented Apr 10, 2024

For sure! Let me know if there's any other information I can provide that would be helpful.

@tomer-stripe
Copy link
Collaborator

tomer-stripe commented Apr 10, 2024

Quick update -- I got Ubuntu 22 running on WSL1 but wasn't able to repro anything. I'm still trying to see if I can get WSL2 running somehow (long story short we don't have easy access to machines that can run the right Windows VMs).

Looking at the code,I wonder if the spinner is causing problems:

fmt.Println(ansi.Faint("This pairing code verifies your authentication with Stripe."))

If you do stripe --color=off login does that work?

@pbanuru
Copy link
Author

pbanuru commented Apr 10, 2024

It doesn't:
image

@tomer-stripe
Copy link
Collaborator

Ah bummer. I'll keep trying to see if I can reproduce but in the mean time --interactive (like you did) should keep you unblocked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants