-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Question] What is the correct way to run hydra token client
CLI command ?
#1396
Comments
You’re using the wrong port (4445) instead of 4444 for token retrieval. I recommend going step by step with the guides on ory.sh/docs or ask in the chat for further help. |
Hello @aeneasr , I've followed step by step guide in which does "An exemplary OAuth 2.0 Client performing the OAuth 2.0 Authorize Code Flow" and it worked fine. But, when I'd like to try example of Then I removed the Replaced |
The 5 Minute tutorial shows how to set up an OAuth 2.0 Client. So does the extended set up guide. Public clients can not request OAuth 2.0 Access Tokens using the Client Credentials grant. Since this would be considered core OAuth 2.0 knowledge, I recommend learning about OAuth 2.0 first: https://www.youtube.com/watch?v=996OiexHze0 |
@aeneasr I understand the typical flow is 'Authorization Code Grant Flow', but I cannot figure out how to setup for the public client (official app or native app). I follow the example as following: Create client:
User authenticate:
And it shows the error as in the original post:
My question is how to combine the OAuth2.0 flow when we want to get the access token in our official website? |
Describe the bug
When running
hydra token client
command, the command returnPlease provide a Client ID and Client Secret using flags --client-id and --client-secret, or environment variables OAUTH2_CLIENT_ID and OAUTH2_CLIENT_SECRET
while the Client is created by callinghydra clients create --skip-tls-verify --id my-app --token-endpoint-auth-method none
CLI command, previously.To Reproduce
Steps to reproduce the behavior:
Create a new client that is intended for WebSPA or Mobile client by invoking this CLI command:

hydra clients create --skip-tls-verify --id my-reactjs-app --token-endpoint-auth-method none
. Confirm that the command is completed and return Client ID with empty Client secret.Run CLI command
hydra token client --skip-tls-verify --endpoint https://hydra_dev:4445 --client-id my-reactjs-app
.See error at below:
Please provide a Client ID and Client Secret using flags --client-id and --client-secret, or environment variables OAUTH2_CLIENT_ID and OAUTH2_CLIENT_SECRET.
Run
hydra token client
with randomclient-secret
:hydra token client --skip-tls-verify --endpoint https://hydra_dev:4445 --client-id my-reactjs-app --client-secret my-random-secret
.See error at below:
What is the proper way to run
hydra token client
CLI command which doesAn exemplary OAuth 2.0 Client performing the OAuth 2.0 Client Credentials Flow
?Version:
The text was updated successfully, but these errors were encountered: