Basically, I'm using JWT Authentication where after successful logging in I'm returning JWT token, Expiration time and User's GUID (Should I?)
And let's take an example:
I have an endpoint that returns User specific data that requires being authenticated
So, how should I do that?
Let's say that
user1 generated his jwt: "a.b.c"
user2 generated his jwt: "c.b.a"
How can I ensure that user1 will not use his JWT to access user's 2 data?
I thought about (as I previously mentioned) sending User's GUID with JWT token and use it as an way to identify that user, but if somebody had somebody's else GUID then he'd be able to manipulate his data, which is not good.
Thanks in advance.