0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

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.
This commit is contained in:
Fabien O'Carroll 2019-03-19 14:02:48 +01:00
parent 036b195af9
commit cbbd28cc90

View file

@ -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;