0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

🐛 Added integrity token to one click subscribe (#20836)

ref https://linear.app/tryghost/issue/ONC-269

When we added the integrity token to all `send-magic-link` callers in
Portal, we missed one.
This commit is contained in:
Steve Larson 2024-08-27 16:17:19 -05:00 committed by GitHub
parent 8f3985bc66
commit 8a1274517d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -484,11 +484,13 @@ async function oneClickSubscribe({data: {siteUrl}, state}) {
const referrerUrl = window.location.href;
const referrerSource = getRefDomain();
const integrityToken = await externalSiteApi.member.getIntegrityToken();
await externalSiteApi.member.sendMagicLink({
emailType: 'signup',
name: member.name,
email: member.email,
autoRedirect: false,
integrityToken,
customUrlHistory: state.site.outbound_link_tagging ? [
{
time: Date.now(),