mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-25 08:09:41 +02:00
OIDC - Specifically check for 401 status before resetting (#3500)
This commit is contained in:
parent
3373abf787
commit
2b6d7811ca
1 changed files with 4 additions and 2 deletions
|
@ -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) {
|
||||||
this.$auth.reset()
|
if (e.response?.status === 401) {
|
||||||
|
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…
Add table
Add a link
Reference in a new issue