mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-09 03:04:54 -04:00
OIDC - Specifically check for 401 status before resetting (#3500)
This commit is contained in:
parent
3373abf787
commit
2b6d7811ca
@ -77,8 +77,10 @@ export default class DynamicOpenIDConnectScheme extends OpenIDConnectScheme {
|
|||||||
})
|
})
|
||||||
// Update tokens with mealie token
|
// Update tokens with mealie token
|
||||||
this.updateTokens(response)
|
this.updateTokens(response)
|
||||||
} catch {
|
} catch (e) {
|
||||||
|
if (e.response?.status === 401) {
|
||||||
this.$auth.reset()
|
this.$auth.reset()
|
||||||
|
}
|
||||||
const currentUrl = new URL(window.location.href)
|
const currentUrl = new URL(window.location.href)
|
||||||
if (currentUrl.pathname === "/login" && currentUrl.searchParams.has("direct")) {
|
if (currentUrl.pathname === "/login" && currentUrl.searchParams.has("direct")) {
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user