Commit Graph

8 Commits

Author SHA1 Message Date
Trim21
2a0d29c1f5 style: add new rule for imports (#785) 2024-08-13 22:31:39 +00:00
Jesse Chan
abf99ba52b shared: schema: explicitly use "strictObject" 2021-05-20 23:17:53 +08:00
Jesse Chan
402a5b8a69 server: invalidate previous tokens when user changed 2021-01-26 09:06:41 +08:00
Jesse Chan
53c0b3f863 server: strictly validate auth token payload 2021-01-26 08:34:13 +08:00
Jesse Chan
ed98e210f4 server: schema validate configurations
Unfortunately there are still many people who prefer static config
file. As such, schema validate the configurations to ensure that
the failure happens loud and early when the config.js is broken.

Also enforces that the length of secret must be larger than 30 as
the JWT secret can be brute forced locally without interaction with
the server.

This ensures that we always have proper configurations and avoids
unnecessary and bad defensive programming practices.
2020-11-14 15:20:23 +08:00
Jesse Chan
ccb410d2e5 config: switch to authMethod config for auth method selection 2020-10-31 20:48:55 +08:00
Jesse Chan
9e03d2a385 shared: schema: split enums from schemas
Otherwise zod will be included in client dependency graph and
increase the bundle size by 10kB unnecessarily.
2020-10-28 12:34:52 +08:00
Jesse Chan
cf08d68c92 auth, Users: initial preparation for multi client support
BREAKING CHANGE
2020-10-14 10:58:52 +08:00