Hasura auth issue when using Clerk (local env issue)
benorudolf opened this issue · comments
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:
- 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'
- Run
nhost up
- 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.
Apologies, this was already fixed. Forgot to update the issue.