🔧 비밀번호 해싱을 bcrypt로 직접 처리
Some checks failed
SonarQube Analysis / SonarQube Scan (push) Has been cancelled
Some checks failed
SonarQube Analysis / SonarQube Scan (push) Has been cancelled
- AuthService.hash_password() 메서드가 없어서 직접 bcrypt 사용 - bcrypt.hashpw()로 비밀번호 해싱 - 회원가입 기능 정상 작동
This commit is contained in:
@@ -66,8 +66,11 @@ async def signup_request(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# 비밀번호 해싱
|
# 비밀번호 해싱
|
||||||
auth_service = AuthService(db)
|
import bcrypt
|
||||||
hashed_password = auth_service.hash_password(signup_data.password)
|
hashed_password = bcrypt.hashpw(
|
||||||
|
signup_data.password.encode('utf-8'),
|
||||||
|
bcrypt.gensalt()
|
||||||
|
).decode('utf-8')
|
||||||
|
|
||||||
# 승인 대기 상태로 사용자 생성
|
# 승인 대기 상태로 사용자 생성
|
||||||
new_user = user_repo.create_user(
|
new_user = user_repo.create_user(
|
||||||
|
|||||||
Reference in New Issue
Block a user