Give more specific reason for failed login
This commit is contained in:
parent
c0e8111d64
commit
ccc460bb5e
3 changed files with 9 additions and 5 deletions
|
@ -10,8 +10,8 @@ const LoginForm = {
|
|||
submit () {
|
||||
this.$store.dispatch('loginUser', this.user).then(
|
||||
() => { this.$router.push('/main/friends')},
|
||||
() => {
|
||||
this.authError = true
|
||||
(error) => {
|
||||
this.authError = error
|
||||
this.user.username = ''
|
||||
this.user.password = ''
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<button :disabled="loggingIn" type='submit' class='btn btn-default base05 base01-background'>Submit</button>
|
||||
</div>
|
||||
<div v-if="authError" class='form-group'>
|
||||
<button disabled='true' class='btn btn-default base05 error'>Error logging in, try again</button>
|
||||
<button disabled='true' class='btn btn-default base05 error'>{{authError}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue