add initial implementation of auth gateway with models, routes, and session management

This commit is contained in:
Eduardo Silva
2026-03-16 09:47:02 -03:00
parent 963ed54c86
commit d84cf0a174
32 changed files with 1532 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import pyotp
def verify_totp(secret: str, token: str) -> bool:
normalized_secret = secret.strip()
normalized_token = token.strip().replace(" ", "")
if not normalized_secret or not normalized_token:
return False
return pyotp.TOTP(normalized_secret).verify(normalized_token, valid_window=1)