Ghost/ghost/core/test
Simon Backx 75bb53f065
🔒 Added support for logging out members on all devices (#18935)
fixes https://github.com/TryGhost/Product/issues/3738
https://www.notion.so/ghost/Member-Session-Invalidation-13254316f2244c34bcbc65c101eb5cc4

- Adds the transient_id column to the members table. This defaults to
email, to keep it backwards compatible (not logging out all existing
sessions)
- Instead of using the email in the cookies, we now use the transient_id
- Updating the transient_id means invalidating all sessions of a member
- Adds an endpoint to the admin api to log out a member from all devices
- Added the `all` body property to the DELETE session endpoint in the
members API. Setting it to true will sign a member out from all devices.
- Adds a UI button in Admin to sign a member out from all devices
- Portal 'sign out of all devices' will not be added for now

Related changes (added because these areas were affected by the code
changes):
- Adds a serializer to member events / activity feed endpoints - all
member fields were returned here, so the transient_id would also be
returned - which is not needed and bloats the API response size
(`transient_id` is not a secret because the cookies are signed)
- Removed `loadMemberSession` from public settings browse (not used
anymore + bad pattern)

Performance tests on site with 50.000 members (on Macbook M1 Pro):
- Migrate: 6s (adding column 4s, setting to email is 1s, dropping
nullable: 1s)
- Rollback: 2s
2023-11-15 17:10:28 +01:00
..
e2e-api 🔒 Added support for logging out members on all devices (#18935) 2023-11-15 17:10:28 +01:00
e2e-browser Updated publishing spec to use a more consistent timezone (#18873) 2023-11-06 07:49:43 +00:00
e2e-frontend 🔒 Added support for logging out members on all devices (#18935) 2023-11-15 17:10:28 +01:00
e2e-server Made new recommendation email more flexible (#18915) 2023-11-08 16:44:48 +00:00
e2e-webhooks Cleaned up lexicalEditor labs flag, switched Post model to lexical-by-default (#18607) 2023-10-23 17:51:34 +01:00
integration Removed email from Mailgun's suppression list on unsubscribe (#18922) 2023-11-13 16:56:37 -03:00
regression Cleaned up lexicalEditor labs flag, switched Post model to lexical-by-default (#18607) 2023-10-23 17:51:34 +01:00
unit 🔒 Added support for logging out members on all devices (#18935) 2023-11-15 17:10:28 +01:00
utils Removed email from Mailgun's suppression list on unsubscribe (#18922) 2023-11-13 16:56:37 -03:00
.eslintignore Added Source as the new default theme 2023-10-03 14:02:08 +02:00
.eslintrc.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00