Details
- Reviewers
inka kamil atul ashoat - Commits
- rCOMM24c786a1a2bf: [keyserver] Remove cookieSources
yarn flow-all, check if web app works. Set the current web version as unsupported and check that the user gets logged out.
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Looks reasonable, thanks for updating comments.
Adding @ashoat as blocking since he has more context and anything having to do w/ auth/sessions is important to get right
I think one of the conditions in the existing code had a mistake and was accidentally reversed
keyserver/src/session/cookies.js | ||
---|---|---|
52–69 ↗ | (On Diff #32034) | We should update types when we touch them. Can you make these types readonly? (In the future, please make sure to update the types before your reviewer notices... ideally I don't have to repeat myself) |
keyserver/src/socket/socket.js | ||
304 ↗ | (On Diff #32034) | It seems like we should add a sessionChange here since the cookie is being deleted. The comment you removed from AuthErrorServerSocketMessage explained that sessionChange was only omitted for HEADER cookies... now that we don't use those, shouldn't we include the sessionChange? I suspect that the condition on the old line 313 was accidentally reversed from the start... based on the removed comment, it seems like sessionChange should be provided for BODY cookies but NOT for HEADER cookies. |
lib/types/socket-types.js | ||
335–343 ↗ | (On Diff #32034) |
|
Update types and client_version_unsupported logic
keyserver/src/socket/socket.js | ||
---|---|---|
304 ↗ | (On Diff #32034) | Thank you for the comment, that makes a lot of sense. I haven't considered the the existing code was wrong... I have updated the code to always include the sessionChange and amended the test plan for web (checks that the user is logged out after client_version_unsupported). Additionally I think I have discovered more issues with handling client_version_unsupported on native and created a task here: ENG-5648. |
lib/types/socket-types.js | ||
335–343 ↗ | (On Diff #32034) | Updated the sessionChange so that it's always specified |