Should I store JWT tokens in redis?

后端 未结 2 668
春和景丽
春和景丽 2021-01-31 03:51

I\'m building an application with ExpressJS, Mongodb(Mogoose). Application contains routes where user has to be authenticated before accessing it.

Currently I have writt

2条回答
  •  Happy的楠姐
    2021-01-31 04:11

    You can use Redis for storing jwt label. Redis is much faster and convenient for storing such data. The request to Redis should not greatly affect the performance. You can try the library jwt-redis

提交回复
热议问题