コンテンツにスキップ

認証 API

ベースパス: /auth

登録

POST /auth/register
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "password123",
  "name": "Alice"
}

レスポンス

{ "access_token": "eyJ..." }

ログイン

POST /auth/login
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "password123"
}

トークンの更新

POST /auth/refresh
Authorization: Bearer <token>

現在のユーザーを取得

GET /auth/me
Authorization: Bearer <token>

レスポンス

{
  "id": "1",
  "email": "user@example.com",
  "name": "Alice"
}