Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hasura auth issue when using Clerk (local env issue) #2613

Open
benorudolf opened this issue Mar 14, 2024 · 0 comments
Open

Hasura auth issue when using Clerk (local env issue) #2613

benorudolf opened this issue Mar 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@benorudolf
Copy link

Describe the bug
When using Clerk's jwk_url value as the NHOST_JWT_SECRET value, the Hasura auth service will not start properly. The error the service throws is:

/app/dist/utils/jwt/get-claims.js:9
throw new Error(`Invalid JWT type:${env_1.ENV.HASURA_GRAPHQL_JWT_SECRET.type}`);

This is only an issue when developing locally. The service works as expected on the remote environment.

To Reproduce
Steps to reproduce the behavior:

  1. Inside nhost.toml replace the default [[hasura.jwtSecrets]] value with the jwk_url from Clerk i.e.
[[hasura.jwtSecrets]]
jwk_url = 'https://[REDACTED].clerk.accounts.dev/.well-known/jwks.json' 
  1. Run nhost up
  2. The hasura-auth service will fail to start, claiming that it is unhealthy.

Expected behavior
The auth service starting normally in local environment, when using jwt_url for the Nhost JWT secret.

Screenshots
n/a

Desktop (please complete the following information):

  • OS: macOS Monterey 12.2.1
  • Browser: Arc 1.33.0/Chromium Engine Version 122.0.6261.112

Additional context
A workaround for this can be to not use the jwt_url value for local development but use the default Hasura auth. Then apply an overlay for the config to use the jwt_url on the remote environment. However this only works if you don't need to use the actual Clerk authentication locally.

@benorudolf benorudolf added the bug Something isn't working label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant