Cannot auto confirm the social sign in prompt on tunnel run
Benehiko opened this issue · 3 comments
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- This issue affects my Ory Cloud project.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Describe the bug
The Ory tunnel will now prompt the user about using the social sign in option like so:
ory tunnel http://localhost:3000 --project <slug> --dev
To support complex flows such as Social Sign In, the Ory CLI can configure your project automatically. To do so, you need to be signed in. Do you want to sign in? [y/n]:
When using the flag --yes
or -y
on the command it doesn't confirm it and continue.
Reproducing the bug
Run ory tunnel
for the first time and the prompt will appear. Try skip it by adding the --yes
flag:
ory tunnel http://localhost:3000 --project optimistic-turing-6cxufsm48m --dev --yes
To support complex flows such as Social Sign In, the Ory CLI can configure your project automatically. To do so, you need to be signed in. Do you want to sign in? [y/n]:
Relevant log output
No response
Relevant configuration
No response
Version
v0.1.41
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Ory Cloud
Additional Context
Reported on slack:
https://ory-community.slack.com/archives/C010F7Z4XM1/p1663858573933829
Right now a workaround could be for the user to pipe in the confirmation themselves:
sh -c "yes | ory tunnel http://localhost:3000/ --project <project-slug> --dev"
ory tunnel http://localhost:3000/ --project <project-slug> --quiet
will do the trick.
Okay nice. Shouldn't we maybe update the cli to be more descriptive?
For instance when running:
➜ ~ ory tunnel -h
...
Flags:
--allowed-cors-origins strings A list of allowed CORS origins. Wildcards are allowed.
-c, --config string Path to the Ory Cloud configuration file.
--cookie-domain string Set a dedicated cookie domain.
--debug Use this flag to debug, for example, CORS requests.
--default-redirect-url string Set the URL to redirect to per default after e.g. login or account creation.
--dev Use this flag when developing locally.
-h, --help help for tunnel
--port int The port the proxy should listen on. (default 4000)
--project string The slug of your Ory Cloud Project.
-q, --quiet Be quiet with output printing.
-y, --yes Confirm all dialogs with yes.
We can se the -q
or --quiet
flag there, but it just says it won't be printing output. In this case I would assume the -y
or --yes
flag to be the one confirming if I want social sign in for example.
Yeah true, we should update the description a bit. Something like "Surpresses all dialogues and answers with the default". Contribs welcomed :)