init commit

This commit is contained in:
prod-tech
2024-11-17 02:31:42 +03:00
commit cf933c770c
217 changed files with 19340 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
import jwt
from app.core.config import config
def decode_jwt(token: str) -> dict:
try:
decoded_token = jwt.decode(
token, config.JWT_SECRET_KEY, algorithms=['HS256']
)
return decoded_token
except (jwt.InvalidTokenError, jwt.ExpiredSignatureError):
return {}