인증

Rememberizer는 사용자 계정 및 세션 관리를 위한 여러 인증 엔드포인트를 제공합니다. 이 문서는 사용 가능한 인증 API를 설명합니다.

회원가입

예제 요청

curl -X POST \
  https://api.rememberizer.ai/api/v1/auth/signup/ \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "secure_password",
    "name": "John Doe",
    "captcha": "recaptcha_response"
  }'

recaptcha_response를 실제 reCAPTCHA 응답으로 교체하세요.

로그인

예제 요청

curl -X POST \
  https://api.rememberizer.ai/api/v1/auth/signin/ \
  -H "Content-Type: application/json" \
  -d '{
    "login": "[email protected]",
    "password": "secure_password",
    "captcha": "recaptcha_response"
  }'

recaptcha_response를 실제 reCAPTCHA 응답으로 교체하세요.

이메일 인증

예제 요청

curl -X POST \
  https://api.rememberizer.ai/api/v1/auth/verify-email/ \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "verification_code": "123456"
  }'

YOUR_JWT_TOKEN을 실제 JWT 토큰으로 교체하고, 이메일로 전송된 인증 코드를 사용하세요.

토큰 관리

예제 요청

curl -X POST \
  https://api.rememberizer.ai/api/v1/auth/custom-refresh/ \
  -b "refresh_token=YOUR_REFRESH_TOKEN"

이 엔드포인트는 인증을 위해 쿠키를 사용합니다. 새로 고침 토큰은 쿠키로 전송되어야 합니다.

로그아웃

예제 요청

curl -X POST \
  https://api.rememberizer.ai/api/v1/auth/custom-logout/

이 엔드포인트는 인증 쿠키를 지웁니다.

const logout = async () => {
  const response = await fetch('https://api.rememberizer.ai/api/v1/auth/custom-logout/', {
    method: 'POST',
    credentials: 'include' // 이 요청에 쿠키를 포함합니다.
  });
  
  if (response.status === 204) {
    console.log("로그아웃 성공!");
  } else {
    console.error("로그아웃 실패!");
  }
};

logout();

이 엔드포인트는 인증을 위해 쿠키를 사용합니다. 애플리케이션이 요청에 자격 증명을 포함하는지 확인하세요.

import requests

def logout():
    session = requests.Session()
    
    response = session.post(
        "https://api.rememberizer.ai/api/v1/auth/custom-logout/"
    )
    
    if response.status_code == 204:
        print("로그아웃 성공!")
    else:
        print("로그아웃 실패!")

logout()

이 엔드포인트는 인증 쿠키를 지웁니다.

{% endtabs %

Last updated