Hasura authentication webhook
The webhook enables integration between Hasura GraphQL engine and Ory Cloud
Prerequisites
For successful integration you need to register the following services
- Ory Cloud with CNAME support (Start Up plan)
- Hasura free tier
- Ngrok for local environment
Domains setup
- graphql.example.com - CNAME for Hasura
- auth.example.com - CNAME for Ory Cloud. Cookie domain should be
example.com
- You can deploy webhook anywhere because Hasura sends data via post request.
Configuring for local enviroment
git clone git@github.com:gen1us2k/hasura-ory-webhook
cd hasura-ory-webhook
go run cmd/main.go
ngrok http 8090
Copy public URL and set environment variables for Hasura Cloud project
HASURA_GRAPHQL_AUTH_HOOK=https://...ngrok.io
HASURA_GRAPHQL_AUTH_HOOK_MODE=post