delightful-noon-48365
05/24/2023, 12:17 PMhydra perform authorization-code
(docs here : https://www.ory.sh/docs/hydra/cli/hydra-perform-authorization-code). It seems that the token is only sent this way or there is another way that I can't find?delightful-noon-48365
05/25/2023, 7:19 AMmagnificent-energy-493
delightful-noon-48365
05/25/2023, 1:01 PMmagnificent-energy-493
brave-pillow-3744
05/26/2023, 7:21 AMAuthorize application
it redirect to incorrect redirect_uri
after running the hydra perform authorization-code
. So you have to manually change it.
2. To your redirect_uri
you will get the scope, code and state in the params
3. Then you have to make POST call to hydra public oauth2/token
with the details to get the access token and refresh tokendelightful-noon-48365
05/26/2023, 8:10 AMAuthorize application
redirects correctly to my redirect_uri
with scope, code and state but I can't get it to work.
How did you get your POST call to hydra public oauth2/token
to work ?brave-pillow-3744
05/26/2023, 8:49 AMcurl --location --request POST '<https://hydra-public.example.com/oauth2/token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=authorization_code' \
--data-urlencode 'scope=openid offline' \
--data-urlencode 'client_id=<client-id>' \
--data-urlencode 'code=<code>' \
--data-urlencode 'redirect_uri=<redirect_uri>'
Also based on the authentication flow in this case was basic auth I added the client_id and client_secret.delightful-noon-48365
05/26/2023, 8:56 AMmagnificent-energy-493
delightful-noon-48365
06/01/2023, 1:56 PM--redirect
argument when you create your client with the command hydra create client
2. Change the --redirect-uri
argument when you create the authorization code flow through the command hydra perform authorization-code
3. Now at the end of the flow you will be redirected to your now redirect uri, but you have to perform a HTTP POST request to get tokens with the instructions given by @brave-pillow-3744