tidbyt / tidbyt.dev

The source for tidbyt.dev 💪
Apache License 2.0
18 stars 11 forks source link

API explorer sending invalid authorization header? #148

Open humanapp opened 1 year ago

humanapp commented 1 year ago

While trying out the API at https://tidbyt.dev/docs/api, my calls would fail with the status code 401 and below response, even though I'd authorized with a valid API key.

{
  "code": 16,
  "message": "auth error: rpc error: code = Unauthenticated desc = Bad authorization string",
  "details": []
}

Inspecting the call in the debugger, I noticed the authorization header does not include the Bearer prefix:

authorization: eyJhbGciOiJFUzI....

Could this be why they're failing?

dmarcucci commented 1 year ago

Yes, I just noticed the same thing myself.

I would expect in the page that it would prepend Bearer and a space for you, but that is not the case.