Skip to content

Commit 1f056bb

Browse files
committed
1.2.3
- on new call of login renew auth header correctly
1 parent f3ad337 commit 1f056bb

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ A node module for Bring! shopping lists.
1414
```javascript
1515
const bringApi = require(`bring-shopping`);
1616

17-
main()
17+
main();
1818

1919
async function main () {
2020
// provide user and email to login
@@ -38,6 +38,8 @@ More important methods are `getItems(listUUID)`, `saveItem(listUuid, itemName, s
3838
`moveToRecentList(listUuid, itemName)` and `getAllUsersFromList(listUuid)`.
3939

4040
## Changelog
41+
### 1.2.3 (2019-09-22)
42+
* (foxriver76) on new call of login overwrite bearer header to allow reauth
4143

4244
### 1.2.2
4345
* (foxriver76) More information on rejection of getItems

lib/bring.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Bring {
3737
this.refreshToken = data.refresh_token;
3838

3939
this.headers[`X-BRING-USER-UUID`] = this.uuid;
40-
this.headers = Object.assign({'Authorization': `Bearer ${this.bearerToken}`}, this.headers);
40+
this.headers[`Authorization`] = `Bearer ${this.bearerToken}`;
4141
this.putHeaders = {...this.headers, ...{'Content-Type': `application/x-www-form-urlencoded; charset=UTF-8`}};
4242

4343
return Promise.resolve();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bring-shopping",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"description": "Nodejs wrapper for the Bring! API",
55
"author": {
66
"name": "Moritz Heusinger",

0 commit comments

Comments
 (0)