diff --git a/package.json b/package.json index e6dfeb8..09f7b18 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hasura-auth", - "version": "0.0.4", + "version": "0.0.5", "description": "Simple auth for HASURA", "main": "./build/index.js", "scripts": { diff --git a/src/auth-tools.ts b/src/auth-tools.ts index 39b2d42..60e054f 100644 --- a/src/auth-tools.ts +++ b/src/auth-tools.ts @@ -13,6 +13,7 @@ export const generateJwtToken = (user: User) => { [vars.hasuraGraphqlClaimsKey]: { [`${vars.hasuraHeaderPrefix}allowed-roles`]: userRoles.join(','), [`${vars.hasuraHeaderPrefix}default-role`]: user.default_role, + [`${vars.hasuraHeaderPrefix}role`]: user.default_role, [`${vars.hasuraHeaderPrefix}user-id`]: user.id.toString(), }, };