Clerk + Hasura

Authenticate your Hasura GraphQL service requests using Clerk as an authentication provider.

Authentication provider

Hasura does not handle authentication itself, but delegates the responsibility to authentication providers like Clerk. It requires user role information to be passed in requests. One of the main authentication mechanisms supported by Hasura is through the use of JSON Web Tokens (JWTs) .

Clerk offers the ability to generate JWTs representing users that are signed in to your application.

Custom claims

JWT Templates

Clerk's JWT Templates allow you to customize the contents of JWTs.

Custom claims

Our template is pre-populated with the default claims required by Hasura, but we make it easy to include additional claims or modify them as necessary.


Shortcodes are special strings that are substituted for their corresponding values during token generation. Shortcodes are typically used to refer to data that depend on the currently authenticated user.

Hasura and GraphQL

At Clerk, we love GraphQL. Hasura allows you to connect to a new or existing database to instantly get a production grade GraphQL API.

Fewer Resources

GraphQL allows for multiple resource requests in a single query call. This saves time and bandwidth by decreasing the amount of necessary network calls.

Integrated Tooling

GraphQL tooling allows you to debug and try queries on a GraphQL server without having to write queries over and over again. Hasura provides a GraphiQL integrated development environment (IDE) console to explore the API.

GraphQL logo

The Frontend Stack

Hasura and Clerk are part of the modern Frontend Stack.

SaaS is moving to the frontend, enabled by easy-to-use frameworks such as Next.js. Modern web services like Clerk and Hasura, work intuitively together and don't require backend setup, allowing you to quickly develop high-quality applications.

The Frontend Stack saves time and resources, allowing you to focus on what makes your application unique.

Get Started with Clerk + Hasura

Check out our documentation on getting started with Clerk and Hasura, or work through our end-to-end tutorial.

Clerk's logo

Start Now,
No Strings Attached

Start completely free for up to 5,000 monthly active users and up to 10 monthly active orgs. No credit card required.

Start building

Pricing built for

businesses of all sizes.

Learn more about our transparent per-user costs to estimate how much your company could save by implementing Clerk.

View pricing
Clerk's logo


The latest news and updates from Clerk, sent to your inbox.

Clerk logo

Clerk - Complete User Management


© 2023 Clerk Inc.


© 2023 Clerk Inc.