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:
lorentz 2026-05-07 07:36:35 -04:00
parent 25e6b7599a
commit 061f266b18

View file

@ -92,6 +92,10 @@ export const auth = betterAuth({
type: "boolean",
defaultValue: false,
},
timezone: {
type: "string",
defaultValue: process.env.DEFAULT_TIMEZONE || "UTC",
},
},
},
});