Forgot Password

비밀번호를 잊은 유저가 자신의 이메일 주소를 입력해 임시 비밀번호를 전송받습니다.

URL
/auth/reset-password/

Method
POST

Data Params

Key Description Type Require
email email 입력. {@}, {.} 으로 유효성 판단. ex) [email protected] String True

Success Response

HTTP Status code

200

Contents

{
    "message": "Your temporary password has been emailed.",
    "to_email": "[email protected]"
}

그러면 해당 이메일 주소로 임시 비밀번호가 담긴 이메일이 전송됩니다.

이메일 내용은 다음과 같습니다.

[Wooltari] 임시 비밀번호

비밀번호를 잊어버리신 경우 임시 비밀번호를 부여합니다.
임시 비밀번호로 로그인 하신 후 원하시는 비밀번호로 변경하시기 바랍니다.

임시 비밀번호 : <영어 소문자 8자리 문자열>

임시 비밀번호는 서버 내에서 랜덤으로 생성되는 영어 소문자 8자리 문자열입니다.

이 임시 비밀번호로 다시 로그인을 하면 로그인에 성공합니다.

Error Response

HTTP Status code

400

# 이메일 정보를 입력하지 않았을 때
{
    "email": [
        "This field may not be blank."
    ]
}
# 이메일 형식에 맞지 않는 문자열을 입력했을 때
{
    "email": [
        "Enter a valid email address."
    ]
}
# DB에 존재하지 않는 이메일을 입력했을 때
{
    "non_field_errors": [
        "Email does not exist."
    ]
}

results matching ""

    No results matching ""