feat(07.1-01): expose user timezone on Better Auth session
- Adds `timezone` to additionalFields on the auth `user` config - Default value reads process.env.DEFAULT_TIMEZONE (falls back to "UTC") - session.user.timezone now available on every authenticated request - Inferred User type automatically picks up the new field — no type changes needed
This commit is contained in:
parent
25e6b7599a
commit
061f266b18
1 changed files with 4 additions and 0 deletions
|
|
@ -92,6 +92,10 @@ export const auth = betterAuth({
|
|||
type: "boolean",
|
||||
defaultValue: false,
|
||||
},
|
||||
timezone: {
|
||||
type: "string",
|
||||
defaultValue: process.env.DEFAULT_TIMEZONE || "UTC",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue