Sign up for Hasura Newsletter
Loading...

Connect Hasura with Auth0

In this part, you will learn how to connect Hasura with the Auth0 application that you just created in the previous step.

We need to configure Hasura to use the Auth0 public keys. An easier way to generate the config for JWT is to use the following link - https://hasura.io/jwt-config

jwt-config

The generated configuration can be used as the value for environment variable HASURA_GRAPHQL_JWT_SECRET.

Open the Hasura Cloud dashboard and head to the "Env vars" page for your Hasura Cloud project:

Hasura ENV Config

Click on + New Env Var to add a new environment variable.

Add a new Config Var called HASURA_GRAPHQL_JWT_SECRET, and copy and paste the generated JWT configuration into the value box.

You should end up with something like the following:

Add new env Cloud

Click on Add and your environment variable will be applied to the project.

Great! Now your Hasura instance is secured using Auth0.

Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2024 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin