Skip to content

Commit

Permalink
chore: release v1.3.1
Browse files Browse the repository at this point in the history
- Fix for Login
  • Loading branch information
TA2k committed Nov 28, 2024
1 parent 8f76a5b commit 2717b53
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 106 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Use id.remote.\* to control the mower
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->
### 1.3.1 (2024-11-28)

- Fix for Login

### 1.3.0 (2024-11-12)

- (simatec) Admin-UI has been adapted for small displays.
Expand Down
44 changes: 18 additions & 26 deletions io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
{
"common": {
"name": "boschindego",
"version": "1.3.0",
"version": "1.3.1",
"news": {
"1.3.1": {
"en": "Fix for Login",
"de": "Fix für den Login",
"ru": "Fix для входа",
"pt": "Correção para login",
"nl": "Fix voor login",
"fr": "Correction pour connexion",
"it": "Fissare per Login",
"es": "Corrección para iniciar sesión",
"pl": "Napraw logowanie",
"uk": "Фіксація для входу",
"zh-cn": "登录的修复"
},
"1.3.0": {
"en": "Admin-UI has been adapted for small displays.\nAdapter requires js-controller 5.0.19 and admin 6.17.14 now.\nIssues reported by adapter checker have been fixed.\nDependencies have been updated.",
"de": "Admin-UI wurde für kleine Displays angepasst.\nAdapter benötigt jetzt js-controller 5.0.19 und admin 6.17.14.\nDie vonm Adapter-Checker gemeldeten Probleme wurden behoben.\nAbhängigkeiten wurden aktualisiert.",
Expand Down Expand Up @@ -80,19 +93,6 @@
"pl": "fix Login",
"uk": "увійти",
"zh-cn": "固定登录"
},
"1.1.0": {
"en": "fix login flow",
"de": "Login Flow gefixt",
"ru": "исправить поток входа",
"pt": "corrigir fluxo de login",
"nl": "vertaling:",
"fr": "login flux",
"it": "correzione del flusso di login",
"es": "corrección de flujo de inicio",
"pl": "naprawa przepływu logowania",
"uk": "виправити потік логіна",
"zh-cn": "fix 伐木"
}
},
"titleLang": {
Expand Down Expand Up @@ -121,12 +121,8 @@
"uk": "Адаптер для косарки Bosch Indego",
"zh-cn": "适用于博世 Indego 割草机的适配器"
},
"authors": [
"TA2k <tombox2020@gmail.com>"
],
"keywords": [
"Indego"
],
"authors": ["TA2k <tombox2020@gmail.com>"],
"keywords": ["Indego"],
"licenseInformation": {
"license": "MIT",
"type": "free"
Expand Down Expand Up @@ -162,12 +158,8 @@
}
}
},
"encryptedNative": [
"password"
],
"protectedNative": [
"password"
],
"encryptedNative": ["password"],
"protectedNative": ["password"],
"native": {
"username": "",
"password": "",
Expand Down
11 changes: 6 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class Boschindego extends utils.Adapter {
}
let formData = '';

const loginParams = await this.requestClient({
const loginUrl = await this.requestClient({
method: 'get',
url: 'https://prodindego.b2clogin.com/prodindego.onmicrosoft.com/B2C_1A_signup_signin/api/CombinedSigninAndSignup/unified',
params: {
Expand All @@ -182,13 +182,14 @@ class Boschindego extends utils.Adapter {
.then((res) => {
this.log.debug(JSON.stringify(res.data));
formData = this.extractHidden(res.data);
return qs.parse(res.request.path.split('?')[1]);
return res.request.path;
})
.catch((error) => {
this.log.error(error);
error.response && this.log.error(JSON.stringify(error.response.data));
});

const loginParams = qs.parse(loginUrl.split('?')[1]);
const loginUrlPath = loginUrl.split('?')[0];
if (!loginParams || !loginParams.ReturnUrl) {
this.log.error('Could not extract login params');
this.log.error(JSON.stringify(loginParams));
Expand All @@ -198,7 +199,7 @@ class Boschindego extends utils.Adapter {
const userResponse = await this.requestClient({
method: 'post',
maxBodyLength: Infinity,
url: 'https://singlekey-id.com/auth/de-de/login',
url: 'https://singlekey-id.com' + loginUrlPath,
headers: {
'content-type': 'application/x-www-form-urlencoded',
accept: '*/*',
Expand Down Expand Up @@ -233,7 +234,7 @@ class Boschindego extends utils.Adapter {
await this.requestClient({
method: 'post',
maxBodyLength: Infinity,
url: 'https://singlekey-id.com/auth/de-de/login/password',
url: 'https://singlekey-id.com' + loginUrlPath + '/password',
headers: {
'content-type': 'application/x-www-form-urlencoded',
accept: '*/*',
Expand Down
123 changes: 58 additions & 65 deletions package-lock.json

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

Loading

0 comments on commit 2717b53

Please sign in to comment.