bradtraversy / proshop_mern

Shopping cart built with MERN & Redux
2k stars 1.18k forks source link

JWT expired = logout is really bad idea #114

Closed Garlikdev closed 3 years ago

Garlikdev commented 3 years ago

It's been fixed. check this PR: https://github.com/bradtraversy/proshop_mern/pull/14/files

_Originally posted by @basir in https://github.com/bradtraversy/proshop_mern/issues/13#issuecomment-707811844_

Why do u implement dispatch logout on every expired jwt instead of refreshing it? I don't want my users to logout every 5 minutes or keep jwt for a month. Can u show the other way?

basir commented 3 years ago

Having refresh token is a requested features by students. we have a list of features and we'll implement them in the next update of this course. in the meantime please check this post: https://marmelab.com/blog/2020/07/02/manage-your-jwt-react-admin-authentication-in-memory.html