Error in authentication with JWT

Hi,

I have setup the following sample vue.js application: GitHub - auth0-samples/auth0-vue-samples: Auth0 Integration Samples for Vue.js Applications

It authenticates fine, but when I try to use the created JWT token to access the API I get the following error:

UnauthorizedError: error:0D0E20DD:asn1 encoding routines:c2i_ibuf:illegal padding

I have tried to replicate the setup, but I get the same error. Does anyone know what the error is?

2 Likes

Hi @n111 Welcome to Auth0 Community.

Could you clarify which token are you referring to? Is it id_token or access_token? Have you tried to inspect the token via jwt.io ? another thing to look into is how you are validating the token on backend? It might be related to the public key you are using per this similar issue on GH Invalid token error: illegal padding error 0D0E20DD · Issue #510 · auth0/node-jsonwebtoken · GitHub

1 Like

Thank you.

I investigated the issue a lot and I think it was related to the public key. I tried to create a new Auth0 account and then it worked. Very strange.

3 Likes

Glad you have it working now!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.