Skip to content

Commit

Permalink
🔒️ fix: fix crypting algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoub3bidi committed Oct 10, 2023
1 parent a74630e commit 6bf9a15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
from database.postgres_db import SessionLocal
from constants.regex import email_regex, password_regex

pwd_context = CryptContext(schemes=["sha256_crypt"], deprecated="auto")
crypting_algorithm = "sha256_crypt" if JWT_ALGORITHM == "HS256" else "bcrypt"

pwd_context = CryptContext(schemes=[crypting_algorithm], deprecated="auto")
db = SessionLocal()

def create_admin_user():
Expand Down

0 comments on commit 6bf9a15

Please sign in to comment.