ory / cli

Create bulk action scripts, automate your tasks, manage your projects, and seamlessly interact with the Ory Network using the Ory command line interface (CLI).
https://www.ory.sh/cli?utm_source=github&utm_medium=banner&utm_campaign=cli
Apache License 2.0
43 stars 22 forks source link

feat: allow using ory tunnel/proxy with project ID as well #311

Closed Benehiko closed 2 months ago

Benehiko commented 1 year ago

Related Issue or Design Document

In the documentation we indicate that a user can spin up the tunnel/proxy using the project ID or the project slug.

The project ID is not currently supported and will show the user an error

{"error":{"code":404,"status":"Not Found","request":"cf6a5564-bca9-95a8-8ec6-c04e8f2e16f1","reason":"The requested host is not associated with any Ory Cloud Project. Are you sure the URL is correct?","message":"The requested resource could not be found"}}

The tunnel/proxy only takes the --project flag and does string manipulation to add the project slug into the ory api string.

https://www.ory.sh/docs/getting-started/local-development#local-development

Checklist

Further comments

Benehiko commented 1 year ago

I had to do a small refactor of naming to get access to some of the proxy configs from a different package proxy_test.

I also added an interface to the CommandHelper to be able to mock it out since it was used to fetch the project on the given ID.

aeneasr commented 1 year ago

https://github.com/ory/cli/actions/runs/5455623971/jobs/9927330763?pr=311 tests fail with compile error

Benehiko commented 1 year ago

https://github.com/ory/cli/actions/runs/5455623971/jobs/9927330763?pr=311 tests fail with compile error

seems to be golangci-lint complaining about something. will update

Benehiko commented 1 year ago

I tried refreshing the snapshots locally with no change using make refresh. I guess I need access to the project or something?