I’m building a project and using Hydra as an Oauth2 Authorization Server. When I developed in local machine, I used:
- Hydra public: localhost:9000
- Hydra admin: localhost:9001
- Express and React: localhost:3000
I make it run successfully. Initialize flow with api:
https://localhost:9000/oauth2/auth?response_type=code&client_id=xxx…
–> redirect to login page with login_challenge. I checked in Storage and see oauth2_authentication_csrf was generated
–> input credential and submit login success
–> call accept login request
–> redirect to consent flow
…
But when deploy: - Hydra in aws ec2 instance
- Express and React: localhost:3000
Initialize flow with api:
https://ec2-ip:9000/oauth2/auth?response_type=code&client_id=xxx…
–> redirect to login page and now when I checked in Storage I don’t see oauth2_authentication_csrf was generated
–> input credential and submit login success
–> call accept login request and get error:
"No CSRF value available in the session cookie"
Why the oauth2_authentication_csrf wasn’t generated when redirect from ec2 to localhost? Any ideal for this error?
Thanks!