Skip to content

Migrate client user details to Cookies

Reputation22 requested to merge fix/ls-cookie-migration into master

Migrate user details on client from localstorage to cookies. Why?

There were cases observed where the user is still logged in, but can't edit the videos. This was the case when the client says the user is logged in, and meanwhile the server says its logged out.

How come this situation arise?.. Well we are storing the user details on localstorage once the user logs in, and not deleting them only when user logs out.

What about the case when user never clicks log out, and the access token expires?... These are the case we're targeting, and we aim to clear out the client session once the access token expires.

How?.. Enters Cookies, with the AGE factor. We set the age to be same as mediawiki oauth2.0 access token, and once the cookies expire, browser removes them, and so the logged out state for client and server is maintained and synced.

Merge request reports