From 90db7588636b545914f41db25323f4132e5dc766 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Mon, 5 Oct 2015 03:34:11 -0700 Subject: [PATCH] fix(auth): Rename edgehill.token => invitationCode in config --- internal_packages/onboarding/lib/account-choose-page.cjsx | 4 ++-- .../onboarding/lib/account-settings-page.cjsx | 7 ++----- internal_packages/onboarding/lib/token-auth-page.cjsx | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/internal_packages/onboarding/lib/account-choose-page.cjsx b/internal_packages/onboarding/lib/account-choose-page.cjsx index 1340e9d81..161cee8f5 100644 --- a/internal_packages/onboarding/lib/account-choose-page.cjsx +++ b/internal_packages/onboarding/lib/account-choose-page.cjsx @@ -79,9 +79,9 @@ class AccountChoosePage extends React.Component # server. provider.encryptionKey = crypto.randomBytes(24) provider.encryptionIv = crypto.randomBytes(16) - code = atom.config.get('edgehill.token') || '' + code = atom.config.get('invitationCode') || '' state = [provider.clientKey,@_base64url(provider.encryptionKey),@_base64url(provider.encryptionIv),code].join(',') - + googleUrl = url.format({ protocol: 'https' host: 'accounts.google.com/o/oauth2/auth' diff --git a/internal_packages/onboarding/lib/account-settings-page.cjsx b/internal_packages/onboarding/lib/account-settings-page.cjsx index 155d30eb6..2833e8fad 100644 --- a/internal_packages/onboarding/lib/account-settings-page.cjsx +++ b/internal_packages/onboarding/lib/account-settings-page.cjsx @@ -241,7 +241,7 @@ class AccountSettingsPage extends React.Component pass: '' sendImmediately: true .then (json) => - invite_code = atom.config.get('edgehill.token') + invite_code = atom.config.get('invitationCode') json.invite_code = invite_code json.email = data.email @@ -252,10 +252,7 @@ class AccountSettingsPage extends React.Component timeout: 30000 body: json success: (json) => - OnboardingActions.accountJSONReceived({ - code: json.code, - invite_code: invite_code - }) + OnboardingActions.accountJSONReceived(json) error: @_onNetworkError .catch(@_onNetworkError) diff --git a/internal_packages/onboarding/lib/token-auth-page.cjsx b/internal_packages/onboarding/lib/token-auth-page.cjsx index b730b845f..f095b3dd7 100644 --- a/internal_packages/onboarding/lib/token-auth-page.cjsx +++ b/internal_packages/onboarding/lib/token-auth-page.cjsx @@ -132,7 +132,7 @@ class TokenAuthPage extends React.Component returnsModel: false timeout: 30000 success: (json) => - atom.config.set("edgehill.token", @state.token) + atom.config.set("invitationCode", @state.token) OnboardingActions.moveToPage("account-choose") error: (err) => _.delay =>