diff --git a/.github/scripts/dev.js b/.github/scripts/dev.js index 712d163d6a..10c42f0abe 100644 --- a/.github/scripts/dev.js +++ b/.github/scripts/dev.js @@ -239,7 +239,8 @@ async function handleStripe() { const {result} = concurrently(commands, { prefix: 'name', - killOthers: ['failure', 'success'] + killOthers: ['failure', 'success'], + successCondition: 'first' }); try { @@ -250,5 +251,6 @@ async function handleStripe() { console.error(chalk.red(`If you've recently done a \`yarn main\`, dependencies might be out of sync. Try running \`${chalk.green('yarn fix')}\` to fix this.`)); console.error(chalk.red(`If not, something else went wrong. Please report this to the Ghost team.`)); console.error(); + process.exit(1); } })(); diff --git a/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx b/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx index 08b6b95fb9..7e38884a47 100644 --- a/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx +++ b/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx @@ -59,6 +59,10 @@ const features = [{ title: 'Comment Improvements', description: 'Enables new comment features', flag: 'commentImprovements' +}, { + title: 'Staff 2FA', + description: 'Enables email verification for staff logins', + flag: 'staff2fa' }, { title: 'Custom Fonts', description: 'Enables new custom font settings', diff --git a/ghost/admin/app/controllers/signin-verify.js b/ghost/admin/app/controllers/signin-verify.js index b148345930..707b83735e 100644 --- a/ghost/admin/app/controllers/signin-verify.js +++ b/ghost/admin/app/controllers/signin-verify.js @@ -121,7 +121,15 @@ export default class SigninVerifyController extends Controller { const resendTokenPath = `${this.ghostPaths.apiRoot}/session/verify`; try { - yield this.ajax.post(resendTokenPath); + try { + yield this.ajax.post(resendTokenPath); + } catch (error) { + // HACK: For some reason, the server returns 200: OK and sends the email but the client still throws an error + // So we need to catch the error and throw it if it's not 'OK' + if (error !== 'OK') { + throw error; + } + } this.startResendTokenCountdown(); return TASK_SUCCESS; } catch (error) {