Skip to content

Commit

Permalink
Fix authentication
Browse files Browse the repository at this point in the history
Due to a change to the Bold API, the authentication process requires additional properties.
  • Loading branch information
StefanNienhuis committed Mar 2, 2022
1 parent 9f356ec commit 1ceacaa
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions homebridge-ui/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class UiServer extends HomebridgePluginUiServer {
try {
let response = await axios.post('https://api.sesamtechnology.com/v1/validations', {
phone: phoneNumber,
language: "en",
purpose: "ValidationWithCode"
language: 'en',
purpose: 'ValidationWithCode'
});

return { validationId: response.data.id };
Expand Down Expand Up @@ -48,7 +48,12 @@ class UiServer extends HomebridgePluginUiServer {

try {
let response = await axios.post('https://api.sesamtechnology.com/v1/authentications', {
validationId
validationId,

// These are modified values captured from the Bold API
clientType: 'IOS',
clientId: 1234567890123456789,
appId: 'com.nienhuisdevelopment.homebridge.bold'
}, {
auth: {
username: phoneNumber,
Expand Down

0 comments on commit 1ceacaa

Please sign in to comment.