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

fix: auth #25

Merged
merged 4 commits into from
Jul 6, 2024
Merged

fix: auth #25

merged 4 commits into from
Jul 6, 2024

Conversation

punchanabu
Copy link
Member

@punchanabu punchanabu commented Jul 6, 2024

Description

check_ins field can be null

  • check_ins field can be null and causing the convertDTOtoUser function error
Screenshot 2567-07-07 at 02 01 25

forgot to put .credential after parsing token

  • we forget to put .credential after parsing a token this leads to token.accessToken, token.refreshToken, token.expiresIn to be undefined ซึ่งมันจะทำให้ getUser ตอน login ครั้งแรกไม่ได้
// but token is like this { userId, credential }
// so If we token.expiresIn it will be undefined ?
 const token: Token = JSON.parse(tokenStr);
  const now = new Date();
  const expire = new Date(token.expiresIn);
Screenshot 2567-07-07 at 01 48 41

Copy link

vercel bot commented Jul 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
firstdate-rpkm67-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 6, 2024 8:15pm

@TeeGoood TeeGoood merged commit b05a4c7 into main Jul 6, 2024
3 checks passed
@TeeGoood TeeGoood deleted the pun/fix/auth branch July 6, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants