From 0348a2e835951337e9fc1f6e18c119857cd7a8fc Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Fri, 6 Oct 2017 11:18:07 -0700 Subject: [PATCH] Warn users trying to auth Gmail via IMAP instead of OAuth --- .../onboarding/lib/page-account-settings-imap.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/internal_packages/onboarding/lib/page-account-settings-imap.jsx b/app/internal_packages/onboarding/lib/page-account-settings-imap.jsx index b6a98c2a5..bdfb0bebb 100644 --- a/app/internal_packages/onboarding/lib/page-account-settings-imap.jsx +++ b/app/internal_packages/onboarding/lib/page-account-settings-imap.jsx @@ -54,6 +54,16 @@ class AccountIMAPSettingsForm extends React.Component { }; submit() { + const { settings } = this.props.account; + if (settings.imap_host && settings.imap_host.includes('imap.gmail.com')) { + AppEnv.showErrorDialog({ + title: 'Are you sure?', + message: + `This looks like a Gmail account! While it's possible to setup an App ` + + `Password and connect to Gmail via IMAP, Mailspring also supports Google OAuth. Go ` + + `back and select "Gmail & Google Apps" from the provider screen.`, + }); + } this.props.onConnect(); }