Skip to content

Commit

Permalink
remove check so we can fallback to another auth method oauth fails
Browse files Browse the repository at this point in the history
  • Loading branch information
cmintey committed Jan 4, 2024
1 parent 131fb29 commit b06598a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mealie/core/security/providers/openid_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def authenticate(self) -> tuple[str, timedelta] | None:
self.session.commit()
return self.get_access_token(user) # type: ignore

if user and (user.password == "OIDC" or user.auth_method == AuthMethod.OIDC):
if user:
if user.admin != admin_claim:
logger.debug(f"[OIDC] {'Setting' if admin_claim else 'Removing'} user as admin")
user.admin = admin_claim
Expand Down

0 comments on commit b06598a

Please sign in to comment.