jwtauth icon indicating copy to clipboard operation
jwtauth copied to clipboard

Getting 401 unauthorized when passing token on multiple services

Open yieniggu opened this issue 2 years ago • 1 comments

Currently I have 2 services:

  • One handles auth logic and generates the jwt using postgres
  • The other handles app data logic and is protected using the same token secret (currently uses mongo)

Somehow I end up getting error 401 unauthorized when passing the tokens from one service to another, why is this happening?

I'm just wondering why it behaves like this. Although the easiest way is to implement an api gateway to solve this, I'd like to know if theres something wrong with my approach.

yieniggu avatar Aug 16 '23 01:08 yieniggu

Hello, @yieniggu! I think it would be good to log an error. Then it will become clearer what the problem is)

Alhanaqtah avatar Dec 25 '24 20:12 Alhanaqtah