Feat: OIDC UI bridge, Microsoft SSO,, and schema session flaws

- OAuth Callback to Use Gatehouse UI to login instead of Backend Served dull ui
- Setup Autoregister of user + org, on oauth
- Microsoft Oauth Support
- OIDCRefreshToken.access_token_id  had a narrow Column increased to VAR(255) and remove FK to sessions.id which had no use
- client_id and client.id mismatch ,backup-code consumption
This commit is contained in:
2026-02-26 23:18:31 +05:45
parent f1fff22f3e
commit 1ba5738d52
14 changed files with 732 additions and 349 deletions
+3 -2
View File
@@ -164,9 +164,10 @@ class TOTPService:
be used again. This ensures each code is single-use.
"""
remaining_codes = []
matched = False
for hashed_code in hashed_codes:
if bcrypt.check_password_hash(hashed_code, code):
if not matched and bcrypt.check_password_hash(hashed_code, code):
# Code found and valid - mark as matched but don't add to remaining codes
matched = True
else:
@@ -176,7 +177,7 @@ class TOTPService:
if matched:
return True, remaining_codes
else:
return False, remaining_codes
return False, hashed_codes
@staticmethod
def generate_qr_code_data_uri(provisioning_uri: str) -> str: