From cbbd28cc901f91741e4ca98a9d9802d4c1313879 Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Tue, 19 Mar 2019 14:02:48 +0100 Subject: [PATCH] Ensured that signups/signins get fresh token no-issue This is to avoid any weirdness around the two requests for signup to a paid site. First we have the signup request, and then we have the create subscription request. After the first signup request a "signedin" event is fired, fetching a token, but one without any plans. --- ghost/sdk/theme-dropin/src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ghost/sdk/theme-dropin/src/index.js b/ghost/sdk/theme-dropin/src/index.js index bbdd0f554b..f5cc0a123c 100644 --- a/ghost/sdk/theme-dropin/src/index.js +++ b/ghost/sdk/theme-dropin/src/index.js @@ -76,7 +76,8 @@ function setupMembersListeners() { members.signin() .then(() => { return members.getToken({ - audience: tokenAudience + audience: tokenAudience, + fresh: true }).then(function (token) { setCookie(token); return true;