mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-25 00:11:06 +00:00
Fix the case of being registered with a version of the cli/sdk that does not support device api keys.
Change-Type: patch
This commit is contained in:
parent
6a7ff91180
commit
89ccb6480d
@ -106,7 +106,9 @@ bootstrap = ->
|
|||||||
.then ->
|
.then ->
|
||||||
knex('config').insert([
|
knex('config').insert([
|
||||||
{ key: 'uuid', value: userConfig.uuid }
|
{ key: 'uuid', value: userConfig.uuid }
|
||||||
{ key: 'apiKey', value: userConfig.deviceApiKey }
|
# We use the provisioning/user `apiKey` if it still exists because if it does it means we were already registered
|
||||||
|
# using that key and have to rely on the exchange key mechanism to swap the keys as appropriate later
|
||||||
|
{ key: 'apiKey', value: userConfig.apiKey ? userConfig.deviceApiKey }
|
||||||
{ key: 'username', value: userConfig.username }
|
{ key: 'username', value: userConfig.username }
|
||||||
{ key: 'userId', value: userConfig.userId }
|
{ key: 'userId', value: userConfig.userId }
|
||||||
{ key: 'version', value: utils.supervisorVersion }
|
{ key: 'version', value: utils.supervisorVersion }
|
||||||
|
Loading…
Reference in New Issue
Block a user