@ashoKumar89 Basically this is not the point of redis. To ambiguous. Redis bout key lookup, you could do user:{id}:* that should return just enough for the user but the user* is bad
@cryptogoos Did you know, the garage door beams used to be built in America snd lasted 25+ years
They are now built in china and last 10 years.
If you want a temu gpu you can buy it from china.
@SidJain_80 Depending on the scenario you either add a timezone, or use milliseconds.
I like bigint millseconds. Than you can convert that on any region.
However if you need to show like a specific timezone you’re gonna need to save timezone
You have a million users and you log everyone out because one person was jeopardized?
Lol, create a sessions table, and the jwt token should resolve to the sessions table.
Delete the session for that user id
Now 999,999 users dont suffer every other second someone is compromised 😂
Reading everyone elses response, I realize yall overcomplicate and overengineer everything
You dont need a redis, you cant blacklist a token you dont own or know, ya’ll are crazy.
The only thing you could do is get the user info from jwt and request user from db see if their banned
But a db SESSION is the solution end of story
@SahilExec Bro there is no such thing as a jwt auth system.
You must have database controlled sessions. Thats the only way. The jwt stores session info.