Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/auth/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ export const auth = betterAuth({
consentPage: `${env.NEXT_PUBLIC_WEB_URL}/oauth/consent`,
allowDynamicClientRegistration: true,
allowUnauthenticatedClientRegistration: true,
accessTokenExpiresIn: 60 * 60 * 24 * 7,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 The arithmetic is correct (604 800 s = 7 days), but a named constant or inline comment would make the intended TTL immediately obvious to future readers without mental arithmetic — especially useful if the value is ever revisited.

Suggested change
accessTokenExpiresIn: 60 * 60 * 24 * 7,
accessTokenExpiresIn: 60 * 60 * 24 * 7, // 7 days
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/auth/src/server.ts
Line: 205

Comment:
The arithmetic is correct (604 800 s = 7 days), but a named constant or inline comment would make the intended TTL immediately obvious to future readers without mental arithmetic — especially useful if the value is ever revisited.

```suggestion
			accessTokenExpiresIn: 60 * 60 * 24 * 7, // 7 days
```

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

validAudiences: [
env.NEXT_PUBLIC_API_URL,
`${env.NEXT_PUBLIC_API_URL}/`,
Expand Down
Loading