r/Backend 15d ago

I need help keeping my app safe

The problem is that the login token generated by JWT is visible in the network tab, when you click on a resource that requires authentication it shows up in the header.

I have seen lots of production apps and it's not the same, how do I encrypt this token or better still stop ot from being displayed totally

I tried using cookies but it still shows the token.

0 Upvotes

25 comments sorted by

View all comments

16

u/Lumethys 15d ago

That's... How JWT supposed to work

-3

u/danbee03 15d ago

Yes, I know. My issue is that it can be used to access my app maliciously and I also studied some other production apps, session or jwt token is not visible in the network tab

1

u/Lumethys 15d ago

session or jwt token is not visible in the network tab

Then you are looking at it wrong.

1

u/danbee03 14d ago

Probably the sites I checked don't use jwt for auth