Skip to content

Commit

Permalink
Fix token refreshing with new authentication flow
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanNienhuis committed Jun 7, 2022
1 parent fd9b87d commit 53f0e67
Show file tree
Hide file tree
Showing 21 changed files with 293 additions and 211 deletions.
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,22 @@ For HOOBS or Homebridge without a configuration UI, you can use the [authenticat
### Manual configuration
An example configuration can be found in the [config.example.json](config.example.json) file.

| Property | Type | Details |
| -------------- | -------- | ------------------------------------------------ |
| `platform` | `string` | **Required**<br/>Must always be `Bold`. |
| `accessToken` | `string` | **Required**<br/>Access token for the Bold API. |
| `refreshToken` | `string` | **Required**<br/>Refresh token for the Bold API. |
| Property | Type | Details |
| ---------------------- | --------- | ------------------------------------------------------------------------------------------------------------------- |
| `platform` | `string` | **Required**<br/>Must always be `Bold`. |
| `accessToken` | `string` | **Required**<br/>Access token for the Bold API. |
| `refreshToken` | `string` | **Required**<br/>Refresh token for the Bold API. |
| `refreshURL` | `string` | **Optional**<br/>Custom refresh URL for token refreshing. Use this only if you authenticated with a custom backend. |
| `legacyAuthentication` | `boolean` | **Required**<br/>Switch between default and legacy authentication. This settings will impact token refreshing. |
| | | |

## Backend

The `backend/` folder contains the source code for the backend that is used while authenticating using the Bold app (default authentication). I host this myself on AWS. While your password is never available to this server, you can choose to self host this backend if you obtain a client id and secret from Bold. Specify a custom backend by clicking the settings icon on the login page.
The `backend/` folder contains the source code for the backend that is used while authenticating using the Bold app (default authentication). I host this myself on AWS, with a client id and secret that was provided to me. While your password is never available to this server, you can choose to self host this backend if you obtain a client id and secret from Bold. Specify a custom backend by clicking the settings icon on the login page. Also specify a custom refresh URL in the config, as a custom client id and secret require refreshing with the same client id and secret.

Alternatively you can also choose to use Legacy Authentication using username/password if you prefer not to use either of these options. This will log out your Bold app as only one username/password session can be active at the same time.
Alternatively you can also choose to use legacy authentication using username/password if you prefer not to use either of these options. This will log out your Bold app as only one username/password based session can be active at the same time.

*Note:* While default authentication is (semi-)supported by Bold, legacy authentication is not supported at all and may break at any time.

## Credits

Expand Down
Loading

0 comments on commit 53f0e67

Please sign in to comment.