You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need to implement a logic where user data stored in cookies would be updated client side, most likely after each hard refresh (If i am able to programmatically differentiate that is).
Update:
Use MongoDB Change Streams to implement listeners on the current profile object.
constcollection=db.collection('inventory');constchangeStream=collection.watch();changeStream.on('change',next=>{// process next document// revalidate session});
Revalidate session once change stream detects a change in user object: username, profile pic
Issue reproduction example:
Login to the website in one browser (ex. Chrome)
Name displayed (ex.) John
Open a new browser or tab variation that does not contain the same cookies and login there as well (ex.) Brave
Initially name is also (ex.) John
Change the name to Smith in (ex.) Brave browser
In (ex.) Brave browser name is updated immediately, displays Smith
Go back to previous browser where you are still logged in due to jwt cookie auth (ex.) Chrome
Name displayed John
The text was updated successfully, but these errors were encountered:
Need to implement a logic where user data stored in cookies would be updated client side, most likely after each hard refresh (If i am able to programmatically differentiate that is).
Update:
Use MongoDB Change Streams to implement listeners on the current profile object.
Revalidate session once change stream detects a change in user object: username, profile pic
Issue reproduction example:
Login to the website in one browser (ex. Chrome)
Name displayed (ex.) John
Open a new browser or tab variation that does not contain the same cookies and login there as well (ex.) Brave
Initially name is also (ex.) John
Change the name to Smith in (ex.) Brave browser
In (ex.) Brave browser name is updated immediately, displays Smith
Go back to previous browser where you are still logged in due to jwt cookie auth (ex.) Chrome
Name displayed John
The text was updated successfully, but these errors were encountered: