Skip to content

Conversation

@Ryuheeeei
Copy link
Contributor

@Ryuheeeei Ryuheeeei commented Feb 13, 2025

The examples of these three commands are based on hydra v1 cli option.

  • hydra create client
  • hydra import client
  • hydra update client

When I follow the examples using hydra v2 cli, it didn't work. I got the message like unknown shorthand flag: 'n' in -n.
I updated these three commands example using v2 option.

Related issue(s)

# The examples and usage section are using v1 options.
$ docker run --rm -it oryd/hydra:v2.3.0 create client --help
...
  hydra create oauth2-client -n "my app" -g client_credentials -r token -a core,foobar --keybase keybase_username
...
Examples:
hydra create oauth2-client -n "my app" -c http://localhost/cb -g authorization_code -r code -a core,foobar


# follows the example
$ docker run --rm -it oryd/hydra:v2.3.0 create oauth2-client -n "my app" -c http://localhost/cb -g authorization_code -r code -a core,foobar
Error: unknown shorthand flag: 'n' in -n

Checklist

Further Comments

Since this is my first time to submit pr to this repo, please tell me if I missed anything.

@Ryuheeeei Ryuheeeei requested review from a team and aeneasr as code owners February 13, 2025 09:00
@CLAassistant
Copy link

CLAassistant commented Feb 13, 2025

CLA assistant check
All committers have signed the CLA.

To encrypt an auto-generated OAuth2 Client Secret, use flags ` + "`--pgp-key`" + `, ` + "`--pgp-key-url`" + ` or ` + "`--keybase`" + ` flag, for example:
{{ .CommandPath }} -n "my app" -g client_credentials -r token -a core,foobar --keybase keybase_username
hydra create client --name "my app" --grant-types client_credentials --response-type token --scope core,foobar --keybase keybase_username
Copy link
Contributor Author

@Ryuheeeei Ryuheeeei Feb 13, 2025

Choose a reason for hiding this comment

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

This isn't hydra import client command. Instead, it seems hydra create client, right ?
According to https://www.ory.sh/docs/hydra/cli/hydra-import-client, it seems hydra create client. Sorry if I misunderstood.

Copy link
Member

Choose a reason for hiding this comment

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

The CommandPath variable automatically sets the correct name for the help command, so the previous version was correct :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you!
I reverted this change. 2099fad

@Ryuheeeei Ryuheeeei force-pushed the fix-cli-help-message branch from 9879f21 to 2099fad Compare February 13, 2025 23:48
@aeneasr aeneasr merged commit e24f9a7 into ory:master Feb 25, 2025
28 checks passed
@Ryuheeeei Ryuheeeei deleted the fix-cli-help-message branch April 25, 2025 08:03
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