Sunday 21 May 2017

Where to store JWT revocation information, mongoDB or Redis?

Currently implementing a MEAN stack user registration / login system using JWT's instead of sessions for all things auth.

In order to be able to revoke a JWT I need to store some JWT info as part of a token blacklist. My initial thought was to use mongoDB for storing blacklisted tokens, but would Redis be suitable too? The reason I'm hesitant to avoid Redis in this case is because if the server crashes / restarts then the token blacklist would be lost, whereas with mongoDB the blacklist would remain intact / persist.

Any advice would be appreciated. Thank you.



via I am me

No comments:

Post a Comment