mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-31 23:20:35 +02:00
Update login query param to x-return-tokens header
This commit is contained in:
parent
beb5e1a56c
commit
79d8ccbf52
1 changed files with 6 additions and 1 deletions
|
@ -627,7 +627,12 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
requestServerLogin() {
|
requestServerLogin() {
|
||||||
return this.postRequest(`${this.serverConfig.address}/login?return_tokens=true`, { username: this.serverConfig.username, password: this.password || '' }, this.serverConfig.customHeaders, 20000)
|
const headers = {
|
||||||
|
// Tells the Abs server to return the refresh token
|
||||||
|
'x-return-tokens': 'true',
|
||||||
|
...(this.serverConfig.customHeaders || {})
|
||||||
|
}
|
||||||
|
return this.postRequest(`${this.serverConfig.address}/login`, { username: this.serverConfig.username, password: this.password || '' }, headers, 20000)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
if (!data.user) {
|
if (!data.user) {
|
||||||
console.error(data.error)
|
console.error(data.error)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue