Skip to content

Commit

Permalink
cloud: dont attempt to register with server if not logged in
Browse files Browse the repository at this point in the history
koush committed Dec 10, 2023
1 parent 1f22218 commit 05b206f
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/cloud/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/cloud/package.json
Original file line number Diff line number Diff line change
@@ -54,5 +54,5 @@
"@types/nat-upnp": "^1.1.2",
"@types/node": "^20.4.5"
},
"version": "0.2.3"
"version": "0.2.4"
}
2 changes: 2 additions & 0 deletions plugins/cloud/src/main.ts
Original file line number Diff line number Diff line change
@@ -574,6 +574,8 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings,
});

const { token_info } = this.storageSettings.values;
if (!token_info)
throw new Error('Scrypted Cloud is not logged in. Skipping home.scrypted.app registration.');
const response = await axios(`https://${SCRYPTED_SERVER}/_punch/register?${q}`, {
headers: {
Authorization: `Bearer ${token_info}`

0 comments on commit 05b206f

Please sign in to comment.