Warn users trying to auth Gmail via IMAP instead of OAuth

This commit is contained in:
Ben Gotow 2017-10-06 11:18:07 -07:00
parent 758f36aba8
commit 0348a2e835

View file

@ -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();
}