Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ユーザ更新時にパスワードのバリデーションをかける #138

Merged
merged 3 commits into from
Nov 17, 2024

Conversation

kimurash
Copy link
Member

やったこと

  • PATCH /users/:userIdのレスポンスボディの仕様を変更した e687a39
  • APIの実装を変更した 6441799

確認した方法

  • Thunder Client
  • テストコード

@kimurash kimurash added the backend backend development label Nov 14, 2024
@kimurash kimurash requested a review from Kosei805 November 14, 2024 19:16
@kimurash kimurash self-assigned this Nov 14, 2024
Copy link
Contributor

@Kosei805 Kosei805 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMです
問題なさそう

@@ -274,14 +275,66 @@ app.patch(
const param = ctx.req.valid('param');
const id = parseInt(param['userId']);

const user = ctx.req.valid('json');
const userIdCookie = getCookie(ctx, 'user_id', 'secure');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

バックエンドのcookieっていつ更新されるの?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

バックエンドで管理してるCookieは以下の2つ

  • ユーザID
  • セッショントークン

Cookieが更新されるタイミング

  • POST /auth
  • DELETE /auth

@kimurash kimurash merged commit 3460e0e into main Nov 17, 2024
3 checks passed
@kimurash kimurash deleted the 136-vld-pwd-upd-user branch November 17, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend backend development
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

ユーザ更新時にパスワードのバリデーションをかける
2 participants