fix(auth): Rename edgehill.token => invitationCode in config

This commit is contained in:
Ben Gotow 2015-10-05 03:34:11 -07:00
parent 0a891ba8c6
commit 90db758863
3 changed files with 5 additions and 8 deletions

View file

@ -79,7 +79,7 @@ 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({

View file

@ -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)

View file

@ -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 =>