Commit Graph

14 Commits

Author SHA1 Message Date
EYHN
f2adbdaba4
style: enable import-x/no-duplicates (#6279) 2024-03-25 03:55:33 +00:00
liuyi
fb3a0e7b8f
refactor(server): auth (#5895)
Remove `next-auth` and implement our own Authorization/Authentication system from scratch.

## Server

- [x] tokens
  - [x] function
  - [x] encryption

- [x] AuthController
  - [x] /api/auth/sign-in
  - [x] /api/auth/sign-out
  - [x] /api/auth/session
  - [x] /api/auth/session (WE SUPPORT MULTI-ACCOUNT!)

- [x] OAuthPlugin
  - [x] OAuthController
  - [x] /oauth/login
  - [x] /oauth/callback
  - [x] Providers
    - [x] Google
    - [x] GitHub

## Client

- [x] useSession
- [x] cloudSignIn
- [x] cloudSignOut

## NOTE:

Tests will be adding in the future
2024-03-12 10:00:09 +00:00
liuyi
4d421a324f
refactor(server): import prisma from @prisma/client (#5863) 2024-02-22 07:46:57 +00:00
L-Sun
46cc0810e9
test(server): incorrect prisma overriding (#5857) 2024-02-22 11:55:37 +08:00
liuyi
e516e0db23
refactor(server): plugin modules (#5630)
- [x] separates modules into `fundamental`, `core`, `plugins`
- [x] optional modules with `@OptionalModule` decorator to install modules with requirements met(`requires`, `if`)
- [x] `module.contributesTo` defines optional features that will be enabled if module registered
- [x] `AFFiNE.plugins.use('payment', {})` to enable a optional/plugin module
- [x] `PaymentModule` is the first plugin module
- [x] GraphQLSchema will not be generated for non-included modules
- [x] Frontend can use `ServerConfigType` query to detect which features are enabled
- [x] override existing provider globally
2024-01-22 07:40:28 +00:00
liuyi
4c49b62ab7
fix(server): node imports order (#5583) 2024-01-14 05:47:56 +00:00
liuyi
89b5c96d25
refactor(server): folder structure (#5573) 2024-01-12 04:18:39 +00:00
liuyi
12fdb18a80
test(server): make server testing utils (#5544) 2024-01-11 06:40:55 +00:00
DarkSky
443908da22
feat: add workspace experimental features api (#5525) 2024-01-06 11:04:49 +00:00
DarkSky
f6ec786ef9
feat: add workspace level feature apis (#5503) 2024-01-05 04:13:49 +00:00
DarkSky
0c2d2f8d16
feat: struct type feature config (#5142) 2023-12-14 09:50:52 +00:00
DarkSky
a93c12e122
feat: user usage gql & test case improve (#5076) 2023-12-14 09:50:42 +00:00
DarkSky
ad23ead5e4
feat: integrate user usage into apis (#5075) 2023-12-14 09:50:37 +00:00
Joooye_34
bed9310519
refactor(infra): directory structure (#4615) 2023-10-18 15:30:08 +00:00