C
C#2mo ago
TheUnquiet

Jwt authorization returning 401 every time

I'm trying to add authentication & authorization to my app using jwt tokens, even after generating the token and logging in I still get a 401 Unauthorized error in swagger, I have 0 clue what's happening.
3 Replies
TheUnquiet
TheUnquietOP2mo ago
If any more code is needed let me know please
Imtiaz
Imtiaz2mo ago
Have you added the bearer token in swagger auth textbox? you have to configure swagger for that. So, when you get token, you have to put that token in the auth textbox, and then you need to hit the authorize endpoint. I am assuming that is the problem here.
Mayor McCheese
Mayor McCheese2mo ago
You can configure swagger for oath as well

Did you find this page helpful?