websanova / vue-auth

A simple light-weight authentication library for Vue.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

redirect to page if i get 503 error

agoalofalife opened this issue · comments

Hi I am using
"@websanova/vue-auth": "^4.2.1", "axios": "^1.1.2", "vue-router": "^3.5.3"

I want to send to a specific user view if I get a 503 error from server - the library will redirect me to the login url
If I write router.push it will go into an infinite loop - since the server always responds with 503
Is it possible to redirect to my view without consequences?

Hmm, vue-auth doesn't really deal with 503, it's only checking for 401.

https://github.com/websanova/vue-auth/blob/master/src/drivers/http/axios.1.x.js#L39

Hard to tell anything from that explanation, seems like some more debugging required. Maybe look at overriding the above linked driver and see if you can find out more.

I didn't find the reason

the problem was solved when i changed the way of inserting the token
from server - to insert manually