mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-01 18:53:59 -04:00
Fix OIDC infinite loop if user is not in OIDC_USER_GROUP (#3487)
This commit is contained in:
@@ -201,7 +201,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function isDirectLogin() {
|
||||
return router.currentRoute.query.direct
|
||||
return Object.keys(router.currentRoute.query).includes("direct")
|
||||
}
|
||||
|
||||
async function oidcAuthenticate() {
|
||||
|
||||
@@ -16,7 +16,6 @@ export default class DynamicOpenIDConnectScheme extends OpenIDConnectScheme {
|
||||
this.$auth.$storage
|
||||
)
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||
return await super.mounted()
|
||||
}
|
||||
@@ -79,6 +78,7 @@ export default class DynamicOpenIDConnectScheme extends OpenIDConnectScheme {
|
||||
// Update tokens with mealie token
|
||||
this.updateTokens(response)
|
||||
} catch {
|
||||
this.$auth.reset()
|
||||
const currentUrl = new URL(window.location.href)
|
||||
if (currentUrl.pathname === "/login" && currentUrl.searchParams.has("direct")) {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user