-
Notifications
You must be signed in to change notification settings - Fork 908
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update mailsync to use OAuth for Outlook, outlook.office.com as the s…
…cope
- Loading branch information
Showing
6 changed files
with
52 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
app/internal_packages/onboarding/lib/page-account-settings-outlook.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from 'react'; | ||
|
||
import { Account } from 'mailspring-exports'; | ||
import { buildO365AccountFromAuthResponse, buildO365AuthURL } from './onboarding-helpers'; | ||
|
||
import OAuthSignInPage from './oauth-signin-page'; | ||
import * as OnboardingActions from './onboarding-actions'; | ||
import AccountProviders from './account-providers'; | ||
|
||
export default class AccountSettingsPageOutlook extends React.Component<{ account: Account }> { | ||
static displayName = 'AccountSettingsPageOutlook'; | ||
|
||
_authUrl = buildO365AuthURL(); | ||
|
||
onSuccess(account) { | ||
OnboardingActions.finishAndAddAccount(account); | ||
} | ||
|
||
render() { | ||
const providerConfig = AccountProviders.find(a => a.provider === this.props.account.provider); | ||
const goBack = () => OnboardingActions.moveToPreviousPage(); | ||
|
||
return ( | ||
<OAuthSignInPage | ||
serviceName="Outlook" | ||
providerAuthPageUrl={this._authUrl} | ||
providerConfig={providerConfig} | ||
buildAccountFromAuthResponse={buildO365AccountFromAuthResponse} | ||
onSuccess={this.onSuccess} | ||
onTryAgain={goBack} | ||
/> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule mailsync
updated
3 files
+1 −1 | MailSync/NetworkRequestUtils.cpp | |
+1 −0 | Vendor/libetpan/src/low-level/imap/mailimap_extension_types.h | |
+1 −1 | build.sh |