value of 'kid' has invalid format

Hei there!

I have an error that was mentioned once in a discussion here. In my Realm app, I use jwk authentication and try to login from a client. As usual, the request is sent with an auth (bearer) header containint the jwk. My problem is, mongodb realm does not validate the key and constantly gives me the error:

‘value of ‘kid’ has invalid format’.

The ‘kid’ value of my jwt header has a vlaue pointing to the key specified in the .jwks url.

Does anyone already encounter this problem?

Thanks,
Nicolas

Hi Nicolas,

Thanks for posting your first question and welcome to the community!
As it has been a while since you posted this, are you still experiencing this error?

Did you follow the instructions for setting up JWT Authentication as per the article below?
https://docs.mongodb.com/realm/authentication/custom-jwt/

Was the authentication ever working previously or are you implementing this for the first time?

This error should not happen unless the wrong token is being sent or it has been inadvertently modified.

If you’re still seeing this issue it might be best to raise a support ticket with us with the following information:

  • Link to your Realm app
  • SDK your client is using
  • The JWT headers you’re sending

http://cloud.mongodb.com/support

Regards
Manny