Skip to content
Permalink
Browse files

[client-app] Skip “Nylas ID” step upon sign-in

  • Loading branch information...
bengotow committed Jul 25, 2017
1 parent bdd5683 commit 367161a620fb308fc222f28bc01077c758e6a26e
@@ -59,3 +59,4 @@ scripts/venv

# OAuth client secret for talking to Google Sheets
client_secret.json
/packages/client-app/internal_packages/client-sync
@@ -37,17 +37,7 @@ class OnboardingStore extends NylasStore {
})

const {existingAccount, addingAccount, accountType} = NylasEnv.getWindowProps();

const hasAccounts = (AccountStore.accounts().length > 0)
const identity = IdentityStore.identity();

if (identity) {
this._accountInfo = {
name: `${identity.firstname || ""} ${identity.lastname || ""}`,
};
} else {
this._accountInfo = {};
}
this._accountInfo = {};

if (existingAccount) {
// Used when re-adding an account after re-connecting
@@ -64,16 +54,6 @@ class OnboardingStore extends NylasStore {
if (accountType) {
this._onSetAccountType(accountType);
}
} else if (identity) {
// Should only happen if config was edited to remove all accounts,
// but don't want to re-login to Nylas account. Very useful when
// switching environments.
this._pageStack = ['account-choose'];
} else if (hasAccounts) {
// Should only happen when the user has "signed out" of their Nylas ID,
// but already has accounts synced. Or is upgrading from a very old build.
// We used to show "Welcome Back", but now just jump to sign in.
this._pageStack = ['authenticate'];
} else {
// Standard new user onboarding flow.
this._pageStack = ['welcome'];
@@ -86,7 +86,7 @@ export default class TutorialPage extends React.Component {
if (nextItem) {
this.setState({current: nextItem, seen: nextSeen});
} else {
OnboardingActions.moveToPage('authenticate');
OnboardingActions.moveToPage('account-choose');
}
}

0 comments on commit 367161a

Please sign in to comment.
You can’t perform that action at this time.