Skip to content

Commit 17a311d

Browse files
committed
[fix] missing access token for identity verification #198
1 parent 24a39b1 commit 17a311d

4 files changed

Lines changed: 13 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
# v9.1.1 - 2026-05-09
4+
- Fix: Missing access token for identity verification (#198)
5+
36
# v9.1.0 - 2026-05-06
47
- Add support for multiple bridges in Config UI
58
- Validate tado account after authentication

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@homebridge-plugins/homebridge-tado",
3-
"version": "9.1.0",
3+
"version": "9.1.1",
44
"description": "Homebridge plugin for controlling tado° devices.",
55
"main": "index.js",
66
"scripts": {
@@ -36,7 +36,7 @@
3636
"@homebridge/plugin-ui-utils": "^2.2.3",
3737
"fakegato-history": "^0.6.7",
3838
"form-data": "^4.0.5",
39-
"fs-extra": "^11.3.4",
39+
"fs-extra": "^11.3.5",
4040
"got": "^15.0.5",
4141
"moment": "^2.30.1"
4242
},

src/tado/tado-api.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export default class Tado {
225225
if (tokenResponse?.body) {
226226
const { access_token, refresh_token } = tokenResponse.body;
227227
if (access_token && refresh_token) {
228-
await this._verifyAuthenticatedIdentity();
228+
await this._verifyAuthenticatedIdentity(access_token);
229229
await writeFile(this._tadoInternalTokenFilePath, JSON.stringify({ access_token, refresh_token }));
230230
this._tadoBearerToken = { access_token, refresh_token, timestamp: Date.now() };
231231
Logger.info("Authentication successful!");
@@ -246,9 +246,8 @@ export default class Tado {
246246
* poisons a token file. Uses got directly because apiCall -> getToken would
247247
* re-enter the in-flight token promise and deadlock.
248248
*/
249-
async _verifyAuthenticatedIdentity() {
249+
async _verifyAuthenticatedIdentity(access_token) {
250250
if (!this.username) return;
251-
const access_token = this._tadoBearerToken?.access_token;
252251
if (!access_token) throw new Error('No access token available for identity verification.');
253252
const url = `${this.tadoApiUrl}/api/v2/me`;
254253
let me;

0 commit comments

Comments
 (0)