Home

Awesome

hasura-supertokens

Open source implementation of Supertokens with Hasura.

This is an ongoing project and implementation used by Off Script.

How to use

You can run this either compiling and running locally or you can just use our public docker image. Make sure you have the correct environment variables in place.

How to set up on Hasura

How to set up the environment

You will need to setup environment variables to run docker or locally hasura-supertokens. Those are:

⚠️ Because hasura-supertokens needs to use your ADMIN_SECRET to create user and assign the role, it's recommended that you only run the service not exposed to the web. ⚠️

How to test it

Running from the docker-compose.yaml located in the hasura demo folder, you can run the following command to test:

curl --location --request POST 'http://localhost:3000/users/create' \
--header 'x-hasura-user-id: 123' \
--header 'Content-Type: application/json' \
--data-raw '{
    "input": {
        "id": "user@yld.oi",
        "email": "user@yld.oi"
    }
}'

Contributors