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

Fix docgen script or documentation: remove or replace X-Hasura-Admin-Secret if it's not required #2474

Open
alexander-mart opened this issue Jan 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@alexander-mart
Copy link
Contributor

alexander-mart commented Jan 19, 2024

Describe the bug
Fix docgen script or documentation manually: https://docs.nhost.io/reference/auth/general/veify-jwt-token

curl --request POST \
  --url https://local.auth.nhost.run/v1/token/verify \
  --header 'Content-Type: application/json' \
-  --header 'X-Hasura-Admin-Secret: <api-key>' \
  --data '{
  "token": "<token>"
}'

or this:

curl --request POST \
  --url https://local.auth.nhost.run/v1/token/verify \
  --header 'Content-Type: application/json' \
+  --header 'Authorization': `Bearer <token>' \
-  --header 'X-Hasura-Admin-Secret: <api-key>' \
-  --data '{
-    "token": "<token>"
-  }'

To Reproduce

Expected behavior
X-Hasura-Admin-Secret is not required header for this auth api request.

Screenshots

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

David Barroso — today, at 1:43
not sure I follow, the description says:

If request body is not passed, the autorization header will be used to be verified

the admin secret is actually not used so it isn't needed, that's most likely an artifact of the docgen that we need to fix

@alexander-mart alexander-mart added the bug Something isn't working label Jan 19, 2024
@alexander-mart
Copy link
Contributor Author

@dbarrosop documentation label is offered :)

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