0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-25 02:31:59 -05:00
ghost/test/e2e-api/admin
Simon Backx c6621dc17d
🐛 Updated support email verification flow (#15029)
refs https://github.com/TryGhost/Team/issues/584

The current support email verification flow uses an API endpoint as verification URL inside the emails. This is a bad pattern, and also has the side effect that it shows a JSON error if something goes wrong.

To fix this, this commit updates the whole flow to use the same pattern as newsletters:
- You can update the `members_support_address` setting directly via the edit endpoint of settings.
- Changes to that (and future 'guarded' email properties) are blocked and generate verification emails automatically.
- When an email verification has been sent, the meta property `sent_email_verification` is set.

Other changes:
- Underlying, the implementation of email verificaton has moved from the (old) members service to the settings BREAD service. This makes it easier to add extra email addresses in settings later on that are not related to 'members'.
- Now you can update the `members_support_address` by updating the settings directly, so the `updateMembersEmail` endpoint has been deprecated and is mapped to the new behaviour.
- The SingleUseTokenProvider threw a `UnauthorizedError` error if a token was expired or invalid. Those errors are caught by the admin app, and causes it to do a page reload (making the error message and modals invisible). To fix that, I've swapped it with a validation error.

Future changes:
- Existing emails that have been sent 24h before this change is applied, still use the `validateMembersEmailUpdate` API endpoint. This endpoint has not been removed for now, to not break those emails. In a future release, we should remove this.

Changes to admin: https://github.com/TryGhost/Admin/pull/2426
2022-07-15 14:43:52 +02:00
..
__snapshots__ 🐛 Updated support email verification flow (#15029) 2022-07-15 14:43:52 +02:00
actions.test.js Aliased canary endpoints to point to non-versioned URLs 2022-03-14 21:22:54 +13:00
config.test.js 🐛 Fixed config API not returning boolean 2022-01-20 18:25:41 +02:00
custom-theme-settings.test.js Fixed filename casing in canary API 2022-03-24 17:25:53 +00:00
db.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
email-previews.test.js Added newsletter param to email preview endpoint (#14820) 2022-05-16 12:15:54 +01:00
emails.test.js Added missing e2e emails API browse & retry tests 2022-03-28 17:32:58 +01:00
explore.test.js Added Ghost Explore endpoint 2022-07-11 16:48:40 +01:00
files.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
images.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
integrations.test.js Added serializer for integrations.destroy 2022-03-22 13:52:32 +00:00
invites.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
key-authentication.test.js Fixed filename casing in canary API 2022-03-24 17:25:53 +00:00
labels.test.js Added expectEmptyBody assertions to e2e framework 2022-03-31 18:56:05 +01:00
media.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
members-exporter.test.js 🐛 Fixed member exports timing out for large sites (#14876) (#14878) 2022-05-20 21:25:23 +01:00
members-importer.test.js Fixed bulk unsubscribe counts (#14871) 2022-05-20 13:40:55 +02:00
members-newsletters.test.js Fixed mockLabs disabling all other flags (#14621) 2022-04-28 10:55:20 +02:00
members-stripe-connect.test.js Added expectEmptyBody assertions to e2e framework 2022-03-31 18:56:05 +01:00
members.test.js 🐛 Fixed 'comped' flag behavior in Member API (#15030) 2022-07-15 11:16:06 +01:00
newsletters.test.js Fixed error in newsletter editing limit checks (#14817) 2022-05-13 10:15:35 +02:00
notifications.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
oembed.test.js 🐛 Fixes oembed bookmark with whitespaces 2021-12-01 15:58:09 +01:00
offers.test.js Added e2e tests for offers API (#14335) 2022-03-24 13:41:48 +01:00
pages.test.js Replaced Products with Tiers API endpoints 2022-05-12 19:59:57 +01:00
posts.test.js Added support for publishing email only posts by setting status to sent (#14950) 2022-06-01 14:53:55 +02:00
redirects.test.js Added serializer for redirects.upload 2022-03-22 13:52:32 +00:00
roles.test.js Added migrations for Ghost Explore integration and API key (#15011) 2022-07-08 09:55:58 +02:00
session.test.js Swapped etag matcher to always be anyEtag 2022-05-02 11:05:07 +01:00
settings-files.test.js Added serializer for missing settings endpoints 2022-03-22 13:52:32 +00:00
settings.test.js 🐛 Updated support email verification flow (#15029) 2022-07-15 14:43:52 +02:00
site.test.js Updated test suites to play nicely with 5.0 2022-05-19 14:19:48 +08:00
slugs.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
snippets.test.js Added expectEmptyBody assertions to e2e framework 2022-03-31 18:56:05 +01:00
stats.test.js Added /stats/subscriptions API (#14547) 2022-04-27 14:53:32 +01:00
tags.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
themes.test.js Added serializer for themes.destroy 2022-03-22 13:52:32 +00:00
tiers.test.js Updated Tiers API data structure (#14795) 2022-05-16 19:47:18 +01:00
users.test.js 🐛 Fixed an error when updating a user 2022-06-02 12:13:27 +01:00
utils.js Renamed newsletter_id and email_recipient_filter options (#14798) 2022-05-16 10:18:04 +02:00
webhooks.test.js Removed subscriber-related webhook fixtures 2022-05-26 14:45:36 +08:00