mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-01-31 15:29:39 +00:00
Fixes for passport local and allow empty password
This commit is contained in:
parent
812395b21b
commit
7010a13648
10 changed files with 206 additions and 75 deletions
|
|
@ -124,7 +124,7 @@ export default {
|
|||
|
||||
location.reload()
|
||||
},
|
||||
setUser({ user, userDefaultLibraryId, serverSettings, Source, feeds }) {
|
||||
setUser({ user, userDefaultLibraryId, serverSettings, Source }) {
|
||||
this.$store.commit('setServerSettings', serverSettings)
|
||||
this.$store.commit('setSource', Source)
|
||||
this.$setServerLanguageCode(serverSettings.language)
|
||||
|
|
@ -143,17 +143,18 @@ export default {
|
|||
this.error = null
|
||||
this.processing = true
|
||||
|
||||
var payload = {
|
||||
const payload = {
|
||||
username: this.username,
|
||||
password: this.password || ''
|
||||
}
|
||||
var authRes = await this.$axios.$post('/login', payload).catch((error) => {
|
||||
const authRes = await this.$axios.$post('/login', payload).catch((error) => {
|
||||
console.error('Failed', error.response)
|
||||
if (error.response) this.error = error.response.data
|
||||
else this.error = 'Unknown Error'
|
||||
return false
|
||||
})
|
||||
if (authRes && authRes.error) {
|
||||
console.log('Auth res', authRes)
|
||||
if (authRes?.error) {
|
||||
this.error = authRes.error
|
||||
} else if (authRes) {
|
||||
this.setUser(authRes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue