Set login cookies with a versioned access path#2152
Set login cookies with a versioned access path#2152pcapriotti wants to merge 2 commits intodevelopfrom
Conversation
To pass the API version to HTTP handlers, the version middleware now sets the `Wire-API-Version` header. The header is not set for API requests that have no version prefix.
There was a problem hiding this comment.
The lifecycle of the api version evolution on backends and clients is separate from the lifecycle of cookies on a user's device.
Currently, as long as a user uses their device at least once every X (default on wire production = 56 days), they continually refresh their cookies and access tokens and are never prompted for a login.
Say a user's device currently has a cookie with http path /v3/access. Now, a new version of backend and client is released that understands v4 and they both agree to use that. That means the client will make a call to /v4/access but the (existing, valid) cookie won't be sent along, leading to the user getting logged out and having to log in again.
This means users will get logged out each time a new version starts being supported by both clients and backends. That's a serious usability deterioration, in a tradeoff for... what exactly? What do we gain by versioning /access?
|
Abandoned in favour of keeping |
good solution! maybe you can leave a comment in the code somewhere, where future me will find it when he tries the same mistake? |
Checklist
changelog.d.