Skip to content
Snippets Groups Projects
Commit b1670255 authored by tusooa's avatar tusooa :zap:
Browse files

Merge branch 'fix-oauth2-token-linger' into 'develop'

Fix OAuth2 token lingering after revocation

See merge request !1852
parents 3c041b2b ac78f801
No related branches found
No related tags found
No related merge requests found
Fix OAuth2 token lingering after revocation
...@@ -651,6 +651,12 @@ const users = { ...@@ -651,6 +651,12 @@ const users = {
const response = data.error const response = data.error
// Authentication failed // Authentication failed
commit('endLogin') commit('endLogin')
// remove authentication token on client/authentication errors
if ([400, 401, 403, 422].includes(response.status)) {
commit('clearToken')
}
if (response.status === 401) { if (response.status === 401) {
reject(new Error('Wrong username or password')) reject(new Error('Wrong username or password'))
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment