Skip to content

Commit

Permalink
[client-app] Skip “Nylas ID” step upon sign-in
Browse files Browse the repository at this point in the history
  • Loading branch information
bengotow committed Jul 25, 2017
1 parent bdd5683 commit 367161a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ scripts/venv

# OAuth client secret for talking to Google Sheets
client_secret.json
/packages/client-app/internal_packages/client-sync
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}

Expand Down

0 comments on commit 367161a

Please sign in to comment.