I cannot get an access token using Postman’s own ‘Oauth2 -> Get new access token’
I’ve set up (docker) hydra to respond to http://127.0.0.1:4444 (and 4445) - with the flag --dangerous-force-http
I have the (docker) login-consent responding at http://127.0.0.1:9020/login (/consent)
Both hydra and the login-consent are in a docker-compose together with a postgres db.
Client is set up correctly and I see it both in the db and by calling /clients/
If I use the ‘hydra token user…’ as in the documentation, the flow goes to the end and I get the access token.
If I try with Postman, I see the login screen. I enter the correct credentials then everything blows up. No CSRF cookie. Why? I set Postman to retain headers.
These are the last 4 entries in hydra’s log:
time="2020-04-28T10:06:17Z" level=info msg="completed handling request" measure#hydra/admin:http://127.0.0.1:4444/.latency=1687911 method=PUT remote="172.18.0.4:56304" request="/oauth2/auth/requests/login/accept?login_challenge=9c803e96955a49b9b0871f768e722d97" status=200 text_status=OK took=1.687911ms
time="2020-04-28T10:06:17Z" level=info msg="started handling request" method=GET remote="172.18.0.1:33318" request="/oauth2/auth?client_id=edge-app&code_challenge=70ikY3XJWsqC0qQg66WxbXxJKcqqCBDXFO7_dJickWo&code_challenge_method=S256&login_verifier=15c069b3a3304ca3b4dce393b62bffba&redirect_uri=http%3A%2F%2F127.0.0.1%3A9010%2Fcallback&response_type=code&scope=data%3Awrite+profile%3Awrite+profile%3Aread&state=abcdefghi"
time="2020-04-28T10:06:17Z" level=error msg="An error occurred" debug="No CSRF value available in the session cookie" description="The request is not allowed" error=request_forbidden hint="You are not allowed to perform this action."
time="2020-04-28T10:06:17Z" level=info msg="completed handling request" measure#hydra/public: http://127.0.0.1:4444/.latency=2526921 method=GET remote="172.18.0.1:33318" request="/oauth2/auth?client_id=edge-app&code_challenge=70ikY3XJWsqC0qQg66WxbXxJKcqqCBDXFO7_dJickWo&code_challenge_method=S256&login_verifier=15c069b3a3304ca3b4dce393b62bffba&redirect_uri=http%3A%2F%2F127.0.0.1%3A9010%2Fcallback&response_type=code&scope=data%3Awrite+profile%3Awrite+profile%3Aread&state=abcdefghi" status=302 text_status=Found took=2.526921ms