Commit Graph

13 Commits

Author SHA1 Message Date
Jesse Chan
1a878d5423 flood: rearrange, remove misc files and reformat 2020-11-15 23:03:47 +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
4ab66d310e server: switch to hash-wasm impl of argon2 2020-11-12 11:30:27 +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
911b6eecb1 client, server: convert chained null checks to optional chaining 2020-10-21 11:35:04 +08:00
Jesse Chan
3610c9ef8d tests: api: auth: full coverage for auth endpoints 2020-10-14 10:58:52 +08:00
Jesse Chan
34b5e09753 server: migrations: add migration for UserInDatabase2 2020-10-14 10:58:52 +08:00
Jesse Chan
cf08d68c92 auth, Users: initial preparation for multi client support
BREAKING CHANGE
2020-10-14 10:58:52 +08:00
Jesse Chan
2940c2379b server: auth: correctly destory user's service when delete user 2020-10-10 02:27:05 +08:00
Jesse Chan
43b2d8fbbf server: services: migrate to TypeScript 2020-09-27 22:27:14 +08:00
Jesse Chan
e489b79589 server: Users: migrate to argon2-browser
So we can get rid of node-gyp.
2020-09-19 22:52:06 +08:00
Jesse Chan
a5ec810521 server: models: migrate "Users" to TypeScript
And refine types of auth components.
2020-09-19 22:50:12 +08:00