Skip to content

Commit dd70915

Browse files
author
Julien Neuhart
authored
Merge pull request #17 from mrbig00/patch-1
Skip redirect on auth error
2 parents 1598599 + 88e543b commit dd70915

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

app/assets/vue/views/Login.vue

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,20 @@
6767
},
6868
},
6969
methods: {
70-
performLogin () {
71-
let payload = { login: this.$data.login, password: this.$data.password },
70+
performLogin() {
71+
let payload = {login: this.$data.login, password: this.$data.password},
7272
redirect = this.$route.query.redirect;
73-
7473
this.$store.dispatch('security/login', payload)
7574
.then(() => {
76-
if (typeof redirect !== 'undefined') {
77-
this.$router.push({path: redirect});
78-
} else {
79-
this.$router.push({path: '/home'});
75+
if (!this.$store.getters['security/hasError']) {
76+
if (typeof redirect !== 'undefined') {
77+
this.$router.push({path: redirect});
78+
} else {
79+
this.$router.push({path: '/home'});
80+
}
8081
}
8182
});
8283
},
8384
},
8485
}
85-
</script>
86+
</script>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy