I’ve been going through the tutorial. Everything has been working well, until I get to the last step: Perform Oauth2 flow. After I login, the app hangs trying to load the consent page: localhost:9020/consent?consent=…
I see the following error in the hydra logs:
time="2017-10-29T02:22:26Z" level=info msg="started handling request" method=POST remote="172.17.0.8:47430" request=/oauth2/token
time="2017-10-29T02:22:26Z" level=error msg="An error occurred" error="The client is not allowed to request scope hydra.consent.*: The requested scope is invalid, unknown, or malformed"
time="2017-10-29T02:22:26Z" level=info msg="completed handling request" measure#https://localhost:9000.latency=92605728 method=POST remote="172.17.0.8:47430" request=/oauth2/token status=400 text_status="Bad Request" took=92.605728ms
Here are the commands I used to create the consent app
hydra clients create --skip-tls-verify \
> --id consent-app \
> --secret consent-secret \
> --name "Consent App Client" \
> --grant-types client_credentials \
> --response-types token \
> --allowed-scopes hydra.consent
You should not provide secrets using command line flags. The secret might leak to bash history and similar systems.
OAuth2 client id: consent-app
OAuth2 client secret: consent-secret
and the policy
hydra policies create --skip-tls-verify \
> --actions get,accept,reject \
> --description "Allow consent-app to manage OAuth2 consent requests." \
> --allow \
> --id consent-app-policy \
> --resources "rn:hydra:oauth2:consent:requests:<.*>" \
> --subjects consent-app
Created policy consent-app-policy.
Any idea what I’m doing wrong?