S
S
Sergey Suntsev2020-07-24 23:00:45
Redis
Sergey Suntsev, 2020-07-24 23:00:45

How to automatically renew a client session?

There is a small service.
Back on node.js (express) + redis + python, for authorization and registration I use - asport.js
Front - react.
I keep all information about user sessions (sessionID, expireData) in redis.
The question is, how can I maintain a user session without requiring a login, given that the tokens live for one week?
How in this case is it better to implement the authorization system, so that the user does not have the inconvenience of logging out, but at the same time it is secure?
It is also interesting how this is implemented in VKontakte, or learn.javascript.ru, there is no logout on these sites.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Tikhonov, 2020-07-26
@GreyCrew

On each visit, simply update the expire session, or recalculate expireData each time, or update using Redis tools if you use them (see EXPIRE )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question