0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
Commit graph

830 commits

Author SHA1 Message Date
Charles Zhao
45395ff74e
refactor: improve allow CORS tooltip wording (#1427) 2022-07-05 21:09:57 +08:00
silverhand-bot
fcd70d1232
release: v1.0.0-alpha.1 2022-07-05 12:34:34 +00:00
Gao Sun
1e96221acf
chore: update docker compose 2022-07-05 19:56:20 +08:00
Gao Sun
273720ea8c
refactor(core): use ENDPOINT to replace original env urls (#1416)
* refactor(core): use `ENDPOINT` to replace original env urls

* refactor(core): log endpoint if needed

* refactor: update AC App ID in tests

* fix(core): oidc issuer

* refactor: remove unnecessary `.toString()`
2022-07-05 10:01:49 +00:00
Charles Zhao
a98fb94e5c
refactor: by default allow redirect URIs for CORS access (#1420)
* refactor: by default allow redirect URIs for CORS access

* refactor: improve wording

Co-authored-by: IceHe.xyz <icehe@silverhand.io>

Co-authored-by: IceHe.xyz <icehe@silverhand.io>
2022-07-05 17:36:43 +08:00
IceHe.xyz
5559fb10c3
fix(core): do not titlize tags of .well-known APIs (#1412) 2022-07-05 04:33:47 +00:00
silverhand-bot
6a83732185
release: v1.0.0-alpha.0 2022-07-04 14:58:52 +00:00
simeng-li
d649755c3e
refactor(ui): refactor default logo (#1402)
* refactor(ui): refactor default logo

refactor default logo

* fix(ui): default logo update

default logo update

* style(ui): add darkLogo

add darkLogo
2022-07-04 10:43:49 +00:00
Gao Sun
5c685d9412
refactor: sign-in content (#1398)
* refactor: sign-in content

* fix: update phrase key
2022-07-04 16:26:39 +08:00
Gao Sun
2fd3833481
refactor(core): db seed question (#1381)
* refactor(core): db seed question

* refactor(core): per code review
2022-07-04 02:53:05 +00:00
silverhand-bot
2caed68c88
release: v0.1.2-alpha.5 2022-07-03 09:04:51 +00:00
silverhand-bot
2faf429e5b
release: v0.1.2-alpha.4 2022-07-03 08:33:26 +00:00
simeng-li
8c4fea093d
refactor(ui): refactor ac signin exp (#1367)
* refactor(ui): refactor ac signin exp

refactor ac signin exp

* fix(ui): adjust style

adjust style

* fix(ui): cr fix

cr fix
2022-07-03 15:50:29 +08:00
silverhand-bot
e588ba204a
release: v0.1.2-alpha.3 2022-07-03 06:54:10 +00:00
Gao Sun
6c323403b3
feat(core): auto sign-out (#1369)
* feat(core): auto sign-out

* fix(core): path when start from root

* refactor(core): per review
2022-07-02 13:55:22 +00:00
silverhand-bot
2fa633a99b
release: v0.1.2-alpha.2 2022-07-02 09:11:16 +00:00
silverhand-bot
e234f64cec
release: v0.1.2-alpha.1 2022-07-02 04:24:46 +00:00
silverhand-bot
9396808fa4
release: v0.1.2-alpha.0 2022-07-02 02:29:37 +00:00
Charles Zhao
a3f42413e9
refactor: get-started task corresponding keys in DB 2022-07-02 09:53:11 +08:00
silverhand-bot
39890c1c29
release: v0.1.1-alpha.0 2022-07-01 19:18:23 +00:00
simeng-li
84aa0e866d
refactor(core): refactor root path (#1352)
* refactor(core): refactor root path

refactor root path

* fix(core): comment fix

comment fix
2022-07-01 10:00:08 +00:00
simeng-li
084a2bcd03
refactor(core): update sign-in-settings api path (#1339)
update sign-in-settings api path
2022-07-01 17:14:38 +08:00
Gao Sun
21ca4d3d62
chore(core): upgrade oidc-provider 2022-06-30 10:44:09 +08:00
Gao Sun
3c7c29dd0c
refactor(core): disable userinfo endpoint (#1310)
* refactor(core): disable userinfo endpoint

* chore: upgrade @logto/react

* refactor(core): update doc link
2022-06-30 02:29:29 +00:00
Wang Sijie
a4d0a940bd
feat(core,console): change admin user password (#1268) 2022-06-29 03:13:26 +00:00
Darcy Ye
05db12492c
fix(core): fix connector readme and configTemplate content parsing (#1267) 2022-06-28 13:35:56 +08:00
Darcy Ye
53781d619d
fix(core): signing in with a non-existing username should throw invalid credentials (#1239) 2022-06-27 13:53:23 +08:00
simeng-li
6865efff27
refactor(ui): refactor app notification logic (#1241)
refactor app notification logic
2022-06-27 13:22:17 +08:00
Darcy Ye
8da9add6b8
refactor(connector-*): load config template and readme contents while initialization (#1252) 2022-06-27 10:00:37 +08:00
Darcy Ye
097aade2e2
feat(connectors): handle authorization callback parameters in each connector respectively (#1166)
* feat(connectors): handle authorization callback parameters in each connector respectively
2022-06-26 18:03:53 +08:00
Wang Sijie
2c413341d1
feat(console): sie form reorg (#1218) 2022-06-24 02:26:30 +00:00
Gao Sun
89e3d68168
ci: dockerize (#1190)
* ci: dockerize

* ci: fix docker compose

* ci: run dockerize on master push only

* refactor: add .gitignore to .dockerignore
2022-06-23 11:17:02 +00:00
Charles Zhao
98d3f64d46
refactor: email/sms connector test API 2022-06-23 17:58:28 +08:00
Darcy Ye
98f808320b
feat(core,connectors): update Aliyun logo and add logo_dark to Apple, Github (#1194)
* feat(core,connectors): add logoDark to connector metadata

* feat(connectors): update Aliyun logo and add logoDark for Apple, Github
2022-06-23 11:12:29 +08:00
Charles Zhao
fa20d03058
Merge pull request #1196 from logto-io/charles-log-3160-add-config-param-to-connector-test-api
refactor(connector,core): add config param to email/sms connector test API
2022-06-22 17:58:37 +08:00
Wang Sijie
012562e2a8
fix(core): remove unavailable social sign in targets on save (#1201) 2022-06-22 16:56:06 +08:00
Charles Zhao
f53aceff6f
refactor(connector,core): add config param to email/sms connector test API 2022-06-22 15:39:43 +08:00
Xiao Yijun
a3d3a79dd9
fix(console): update user data (#1184) 2022-06-22 03:36:43 +00:00
Wang Sijie
9194a6ee54
feat(console,core): hide admin user (#1182)
* feat(console,core): hide admin user

* fix: extract hideAdminUser

* test: add tests for hideAdminUser
2022-06-22 02:22:15 +00:00
Darcy Ye
ad86bc8e12
fix(core,console): delete specific user identities by target (#1176) 2022-06-21 23:26:23 +08:00
Charles Zhao
477b5988a9
refactor(console): application sdk integration guide 2022-06-21 17:23:33 +08:00
simeng-li
e0793facb9
fix(core): settings api should not throw session not found error (#1157)
settings api shouyld not throw session not found error
2022-06-21 08:56:01 +08:00
simeng-li
4f32ad3a51
feat(core): register with admin role (#1140)
* feat(core): register with admin role

register user with admin role

* fix(core): cr fix

cr fix
2022-06-20 03:32:50 +00:00
simeng-li
b42f4ba1ff
feat(ac): implement admin console welcome page (#1139)
implement admin console welcome page
2022-06-20 10:58:27 +08:00
simeng-li
837ad523ce
feat(core): add role table seed (#1145)
* fix(core): add default role db seed

add defaylt role db seed

* fix(table): add role table default seed

add role table default seed

* fix(db): cr fix

cr fix
2022-06-20 02:22:23 +00:00
Wang Sijie
3cf34b5911
fix(core): align jsonb replace mode (#1138) 2022-06-17 14:45:39 +08:00
Darcy Ye
41e37a7995
feat(core): identities key should use target not connectorId (#1115)
* feat(core): identities key should use target not connectorId

* refactor(core): make test file size in limit

* feat(console): use target in user connectors (#1134)

Co-authored-by: Wang Sijie <wangsijie@silverhand.io>
2022-06-17 11:00:02 +08:00
Darcy Ye
f8710e147d
feat(core): add smtp connector (#1131)
* feat(connector-smtp): add smtp connector

* feat(connector-smtp): fix UTs
2022-06-17 10:52:35 +08:00
simeng-li
f640dad52f
feat(core): add sign-in-mode (#1132)
* feat(core): add sign-in-mode
add sign-in-mode

* fix(core): remove console.log

remove console.log

* fix(ui): hide secondary signin section
hide secondary signin section if is under register mode

* fix(core): ci fix

ci fix
2022-06-17 10:36:07 +08:00
IceHe.xyz
511012da92
feat(core): convert Zod union, literal and string guards to OpenAPI schemas (#1126)
* feat(core): convert Zod union and literal guards to OpenAPI schemas

* feat(core): parse swagger schema format with Zod string checks

* test(core): unexpected zod string check

* test(core): unexpected zod literal check
2022-06-16 16:46:38 +08:00
IceHe.xyz
a26299941f
feat(core): append page and page_size to the query parameters in swagger.json (#1120)
* feat(core): append page and page_size to the query parameters in swagger.json

* refactor(core): simplify hasPagination

* chore(core): add a comment to note why name the pagination middleware function
2022-06-15 15:13:04 +08:00
Xiao Yijun
9262a6f3be
fix(console): update terms of use (#1122) 2022-06-15 12:16:37 +08:00
Darcy Ye
985fe7203a
refactor(core): separate session routes and UTs (#1104)
* refactor(core): separate session routes and UTs

* refactor(core): reorganize and rename files
2022-06-14 21:48:05 +08:00
Darcy Ye
efa9491749
feat(core): add switch of enabling object fully replace when updating DB (#1107)
* feat(core): add switch of enabling object fully replace when updating DB

* feat(core): assign default jsonbMode value if possible
2022-06-14 21:38:10 +08:00
Charles Zhao
0014a4696b
chore: remove only-allow pnpm from all sub-packages 2022-06-14 17:18:13 +08:00
Wang Sijie
a790248c09
fix(core): remove name regex (#1109) 2022-06-14 11:36:03 +08:00
IceHe.xyz
7339a85a1b
feat(core): any-type parameter shows empty object in swagger example (#1110) 2022-06-13 10:32:52 +00:00
IceHe.xyz
75ac874a2d
feat(core): dau curve contains 0 count points (#1105) 2022-06-13 16:18:16 +08:00
Darcy Ye
1b8190addf
feat(core): align connector error handler middleware with ConnectorErrorCodes (#1063)
* feat(core): align connector error handler middleware with ConnectorErrorCodes

* feat(phrases,core): fix locale error descriptions
2022-06-10 10:25:28 +08:00
Darcy Ye
bcc05e521d
feat(core): remove unnecessary variable check and unused route (#1084) 2022-06-09 16:24:47 +08:00
Xiao Yijun
b9ca929ccc
refactor(core): remove unused /users/:userId/custom-data APIs (#1086) 2022-06-09 16:23:56 +08:00
simeng-li
f6f562a8ba
feat(core): add welcome route (#1080)
* feat(core): add welcome route

add welcome route

* fix(ui): fix some koa middleware

fix some koa middleware

* fix(core): ut fix

ut fix

* refactor(core): refactor welcome user guard

refactor welcome user guard
2022-06-09 11:42:52 +08:00
Charles Zhao
fc35c5d8dc
refactor(core): remove unnecessary console.log 2022-06-07 22:46:56 +08:00
Charles Zhao
39b1d74cfd
Merge pull request #1068 from logto-io/charles-log-2740-koaAuth-should-return-403-on-non-admin-role
fix(core): koaAuth should return 403 instead of 401 on non-admin role
2022-06-07 22:43:58 +08:00
Charles Zhao
ee16eeb966
fix(core): koaAuth should return 403 instead of 401 on non-admin role 2022-06-07 19:13:40 +08:00
IceHe.xyz
2ba11215ed
feat(core): log error body (#1065) 2022-06-07 10:16:14 +00:00
Gao Sun
69e32cb646
refactor(core): remove confusing assertThat signature (#1066) 2022-06-07 16:26:04 +08:00
Gao Sun
f2b44b49f9
feat: use user level custom data to save preferences (#1045)
* feat: use user level custom data to save preferences

* fix(console): bugs

* refactor(console): per review

* refactor(core): update return order

* fix(core): error constructor
2022-06-07 16:05:24 +08:00
IceHe.xyz
3145c9b348
feat(core): convert route guards to swagger.json (#1047)
* feat(core): convert route guards to swagger.json

* test(core): swaggerRoutes

* refactor(core): simplify buildParameters

* chore(core): describe 'any' data type of OpenAPI schema in zodTypeToSwagger

* chore(core): improve the description 'any' data type of OpenAPI schema in zodTypeToSwagger
2022-06-07 07:24:57 +00:00
IceHe.xyz
8af2f953cf
feat(core): make GET /api/swagger.json contain all api routes (#1008) 2022-06-05 14:34:50 +08:00
renovate[bot]
28779e847f
chore(deps): update dependency openapi-types to v12 (#1046)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-04 16:35:36 +08:00
Darcy Ye
2e08fa3816
chore(core,locale): fix error messages of signing in with non-existing username (#1035)
* chore(core,locale): fix error messages

* chore(core,locale): add input parameter guard and fix comment

* chore(core,locale): add nonempty string guard for username
2022-06-02 08:29:17 +00:00
Gao Sun
36c958a11d
refactor(core): recognize developer id in header (#1031) 2022-06-02 08:01:33 +00:00
Gao Sun
91e2f055f2
feat(demo-app): implementation (3/3) (#1021)
* feat(core): seed demo app for fresh DB

* feat(core): throw 404 when demo app deleted

* fix(core): import

* fix: lockfile
2022-06-02 07:32:46 +00:00
renovate[bot]
d1b9f9d28a
chore(deps): update dependency lint-staged to v13 (#1019)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-02 13:19:09 +08:00
Charles Zhao
5a1fa14a98
fix(core): update roleNames to role_names to resolve 401 errors 2022-06-02 12:10:35 +08:00
Gao Sun
d4f38bce2b
feat(core): add etag for settings api (#1011) 2022-06-01 16:56:23 +08:00
Gao Sun
124d7acf49
refactor(core): use snake_case for extra claims (#1017) 2022-06-01 16:02:23 +08:00
Gao Sun
8a52c84e32
refactor(core): align role_names claim with DB (#1016) 2022-06-01 07:43:16 +00:00
Gao Sun
7781d49667
feat(core): set claims for profile scope (#1013) 2022-06-01 15:00:10 +08:00
Gao Sun
2812d6de46
refactor(core): serve static middleware (#1010)
* refactor(core): serve static middleware

* chore(deps): remove unused package

* refactor(core): per review

* fix(core): test

* refactor(core): using endsWith to detect index
2022-06-01 05:12:15 +00:00
Darcy Ye
5fc2fc6ff7
chore(connectors): config template md files to json files (#987)
* chore(connectors): config template md files to json files

* chore(connectors): fix path of reading config-template files
2022-05-31 12:58:24 +08:00
Gao Sun
7f4f4f84ad
feat(demo-app): implementation (#982)
* feat(demo-app): init card

* feat(demo-app): ui

* feat(demo-app): sign in using React SDK

* fix: typo
2022-05-31 04:39:03 +00:00
IceHe.xyz
2ae4e2eccf
feat(core): order logs by created_at desc (#993) 2022-05-30 09:40:03 +00:00
IceHe.xyz
28198590fa
fix(core): allow empty condition in logs (#991) 2022-05-30 09:30:18 +00:00
Wang Sijie
4768181bf7
fix(console,core): only show enabled connectors in sign in methods (#988) 2022-05-30 16:28:04 +08:00
IceHe.xyz
1420bb28ce
feat(core,shared): get /dashboard/users/active (#953)
* feat(core,shared): get /dashboard/users/active

* refactor(core): get /dashboard/users/active

* refactor(core): get /dashboard/users/active

* refactor(core): simplify GET /dashboard/users/active

* refactor(core): simplify dashboardRoutes
2022-05-30 13:51:58 +08:00
Gao Sun
a686b1707a
refactor: social connectors (#975)
* refactor: social connectors

* refactor(connectors): remove unused fixme comment

* fix(connectors): test
2022-05-29 05:59:00 +00:00
Gao Sun
8d17f9d73a
Merge pull request #973 from logto-io/gao-update-apple-connector
refactor(connector): remove apple js sdk
2022-05-28 22:08:50 +08:00
Darcy Ye
ae97e7bd27
refactor(core, connector): fix code to fit new ESlint rule (#942)
* refactor(core): separate/refactor connector route UTs

* refactor(connector-wechat*): fix wechat connectors error handler to fit new eslint rule

* refactor(connector-wechat*): fix error handler
2022-05-27 21:21:23 +08:00
simeng-li
545a3929e4
fix(core): fix preview session not found bug (#970)
* fix(core): fix preview session not found bug

fix preview session not found bug

* fix(core): cr fix

cr fix
2022-05-27 19:58:40 +08:00
Gao Sun
52c745d41f
refactor(connector): remove apple js sdk 2022-05-27 19:06:06 +08:00
Gao Sun
7400ed8896
feat(connector): apple (#966)
* feat(connector): apple

* feat(connector): apple

* fix(connector): test

* refactor(connector): per review

* refactor(connector): update issue number

Co-authored-by: Xiao Yijun <xiaoyijun@silverhand.io>
2022-05-27 15:43:42 +08:00
simeng-li
909535f4af
fix(core): update proxy guard middleware (#963)
update proxy guard middleware
2022-05-26 16:54:40 +08:00
IceHe.xyz
45a977790e
feat(core): get /dashboard/users/new (#940) 2022-05-26 11:24:52 +08:00
IceHe.xyz
c4bb0de7d4
feat(core): get /dashboard/users/total (#936)
* feat(core): get /dashboard/users/total

* test(core): get /dashboard/users/total
2022-05-25 16:54:21 +08:00
Wang Sijie
077ed120f0
fix(core): prevent session lost for bind social (#948) 2022-05-25 15:26:40 +08:00
IceHe.xyz
bddf47bf90
feat(core): get /logs/:id (#934) 2022-05-25 14:59:02 +08:00
Darcy Ye
96796203dd
feat(native-connectors): pass random state to native connector sdk (#922)
* feat(native-connectors): pass random state to native connector SDK

* refactor(connector-*): update type GetAuthorizationUri

* refactor(core): fix input params order
2022-05-25 14:23:53 +08:00
simeng-li
cf360b9c15
feat(core): add admin role validation to the koaAuth (#920)
* feat(core): add admin role validation to the koaAuth

add admin role validation to the koaAuth

* fix(core): cr fix

cr fix
2022-05-24 16:42:28 +08:00
Wang Sijie
5b44b7194e
feat(core): serve connector logo (#931) 2022-05-24 13:54:37 +08:00
Darcy Ye
054b0f7b6a
feat: remove target, platform from connector schema and add id to metadata (#930)
* feat(core,schema,connectors): remove target,platform form connector schema and add id to metadata

* feat(schema,ui,console): unwrap ConnectorMetadata in ConnectorDTO

* feat(schema,ui,console): connector id use dashline instead of underscore

* feat(connector-alipay*): fix typos

* feat(connector-alipay*): remove unnecessary type declaration
2022-05-24 11:39:44 +08:00
Darcy Ye
10d30ee309
refactor(core): remove getConnectorInstanceByType (#921)
* feat(core): remove getConnectorInstanceByType

* feat(connectors): add UTs
2022-05-23 23:39:36 +08:00
Gao Sun
43d4fd23fd
refactor: remove AC client dependency (#917)
* refactor: remove AC client dependency

* refactor: admin console URL and management API indicator

* fix: typo
2022-05-23 11:18:48 +00:00
Wang Sijie
16ec018b71
fix: connectors platform (#925) 2022-05-23 17:54:05 +08:00
Xiao Yijun
fe99928a41
fix(core): revert add custom claims to id token (#919)
This reverts commit 9ccda932a4.
2022-05-22 03:33:13 +00:00
simeng-li
207c404aeb
feat(core): empty path sould redirect to the console page (#915)
* feat(core): empty path sould redirect to the console page

empty path should redirect to the console page

* fix(core): remove console log

remove console log

* fix(core): cr fix

cr fix
2022-05-22 10:32:04 +08:00
IceHe.xyz
5d7f2e436c
refactor(core,schemas): remove passcode in logs (#916) 2022-05-20 17:04:22 +00:00
Xiao Yijun
9ccda932a4
feat(core): add custom claims to id token (#911) 2022-05-20 22:37:47 +08:00
Xiao Yijun
d65999514f
fix(core): update role names (#913) 2022-05-20 17:59:55 +08:00
IceHe.xyz
e5196fc31d
feat(core): grantRevokedListener for logging revocation of access and refresh token (#900)
* feat(core): grantRevokedListener for logging access and refresh token revocation

* chore(core): improve description of grantRevokedListener test cases

* refactor(core): extract addOidcEventListeners
2022-05-20 13:54:05 +08:00
Darcy Ye
9589aeafec
feat(connector-alipay-native): add Alipay Native connector (#873)
* feat(connector-alipay-native): add Alipay Native connector

* feat(connector-alipay-native): add Alipay Native connector to initialization
2022-05-20 13:40:40 +08:00
Gao Sun
3daf574946
test: allow JS in tests (#903) 2022-05-20 13:02:36 +08:00
renovate[bot]
e5cb163dc2
chore(deps): update dependency @shopify/jest-koa-mocks to v4 (#904)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-20 10:41:09 +08:00
simeng-li
67f080e862
feat(core): add phone number and email mask (#891)
* feat(core): add phone number and email mask

add phone number and email mask

* fix(core): fix typo

fix typo
2022-05-20 10:04:52 +08:00
Darcy Ye
d7ce13d260
feat(connector-twilio-sms): add twilio sms connector (#881)
* feat(connector-twilio-sms): add twilio sms connector

* feat(connector-twilio-sms): add twilio sms connector to initialization
2022-05-20 09:56:16 +08:00
Gao Sun
17c63cd2d9
feat(core): cookie keys configuration (#902)
* feat(core): cookie keys configuration

* refactor: improved wording

* refactor: improved wording

* fix(core): test
2022-05-20 00:08:33 +08:00
IceHe.xyz
797344f6f5
feat(core): grantErrorListener for logging token exchange error (#894)
* feat(core): grantErrorListener for logging token exchange error

* refactor(core): extract getLogType

* refactor(core): oidc provider event listeners will skip logging if found unexpected grant_type

* test(core): oidc provider event listeners will skip logging if found unexpected grant_type
2022-05-19 19:48:34 +08:00
Wang Sijie
65fb36ce3f
feat(core,console): connector platform tabs (#887)
* feat(core,console): connector platform tabs

* fix: cr
2022-05-19 06:05:31 +00:00
IceHe.xyz
ed5f370bdb
refactor(core): remove SignInSocial log from POST /session/sign-in/social (#890) 2022-05-19 13:51:54 +08:00
Xiao Yijun
b2ac2c14ee
feat(core): disable introspection feature (#886) 2022-05-19 13:50:07 +08:00
IceHe.xyz
e9e7efdc92
refactor(core): move GET /sign-in-settings out of sessionRouter (#875) 2022-05-19 11:24:42 +08:00
IceHe.xyz
3b048a80a3
feat(core,schemas): log token exchange success (#809) 2022-05-19 11:24:26 +08:00
Xiao Yijun
85a407c5f6
feat: update field check rules (#854) 2022-05-18 04:12:51 +00:00
Darcy Ye
b887655827
feat(connector-sendgrid-email): add sendgrid email connector (#850)
* feat(connector-sendgrid-mail): add SendGrid Mail connector

* feat(core): add SendGrid Mail connector to initializer and fix usageType
2022-05-18 11:39:36 +08:00
Wang Sijie
664a2180a5
feat(console): dark logo (#860) 2022-05-18 10:25:20 +08:00
renovate[bot]
b5bdfcbc5b
chore(deps): update dependency @silverhand/jest-config to ^0.14.0 (#869)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 13:33:53 +00:00
simeng-li
82674eea88
fix(core): disabled session check for preview mode (#867)
disabled session check for preview mode
2022-05-17 19:34:38 +08:00
renovate[bot]
8a012a393d
chore(deps): update dependency @silverhand/ts-config to ^0.14.0 (#859)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 11:04:12 +00:00
renovate[bot]
3316bbf429
chore(deps): update dependency @silverhand/eslint-config to ^0.14.0 (#866)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 10:42:15 +00:00
renovate[bot]
66b57ad4d5
chore(deps): update dependency @silverhand/eslint-config to ^0.13.0 (#858)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 18:07:13 +08:00
Gao Sun
f4526a9a3f
refactor: use @silverhand/jest-config (#861) 2022-05-17 17:32:41 +08:00
Wang Sijie
127664a62f
feat(core,console): social connector targets (#851)
* feat(core,console): social connector targets

* fix: add test
2022-05-17 17:09:42 +08:00
simeng-li
5d34442018
fix(ui): fix sign-in not found bug (#841)
fix sign-in not found bug
2022-05-16 06:59:38 +00:00
IceHe.xyz
4ffd4c0480
feat(core): get /logs (#823)
* feat(core): get /logs

* chore(core): rename userRequest to logRequest in UTs
2022-05-16 06:43:33 +00:00
IceHe.xyz
82c7138683
feat(core): log sending passcode with connector id (#824) 2022-05-16 06:40:51 +00:00
simeng-li
78d3bb6045
refactor(ui): add session guard to ui page (#803)
* refactor(ui): add session guard to ui page

add session guard to ui page

* test(core): fix ut

fix ut

* fix(core):  fix typo

fix typo
2022-05-16 05:43:23 +00:00
IceHe.xyz
38ceae7853
fix(core): catch interaction not found error (#827) 2022-05-15 13:20:07 +08:00
IceHe.xyz
4e60446411
feat(core,schemas): koaLogSession middleware (#767)
* feat(core,schemas): koaLogSession middleware

* fix(core): koa-log-session call next() first

* refactor(core,schemas): merge SessionLogPayload into BaseLogPayload

* refactor(core,schemas): rename logSession to addLogContext
2022-05-13 20:37:36 +08:00
Darcy Ye
ab6c124620
fix(connector-wechat-native): fix wechat-native target (#820) 2022-05-13 09:34:42 +00:00
Darcy Ye
7a922cbd33
feat(core): add socialConnectors details for get sign-in-settings (#804)
* feat(core,ui): add social connector info to get-settings api

* refactor(connectors): rename api
2022-05-13 07:59:07 +00:00
Darcy Ye
0ea55134a9
feat(core): expose connector and metadata from sendPasscode (#806) 2022-05-13 14:17:15 +08:00
Darcy Ye
8e1533a702
feat(core): update connector db schema (#732)
* feat(core): update connector db schema

* feat(core): eliminate code redundancy for UTs

* feat(core): delete insertConnector on conflict logic and fix UTs

* feat(core): fix UI according to new connector type implementation

* feat(core): removed unused getConnectorByTargetAndPlatform methods

* feat(core): deprecate the function that updateConnector by giving target and platform

* feat(core): keep SSOT on combination of connector and corresponding metadata

* feat(core): rename index name in db
2022-05-12 12:17:17 +08:00
Renovate Bot
d36abe1ee5
chore(deps): update dependency @silverhand/ts-config to ^0.12.0 2022-05-11 12:26:08 +00:00
Renovate Bot
d5ef7ddbe3
chore(deps): update dependency @silverhand/eslint-config to ^0.12.0 2022-05-11 11:48:42 +00:00
Wang Sijie
74f2940398
fix(core): social user info in session (#794) 2022-05-11 10:01:17 +00:00
Charles Zhao
1255c6d1e7
Merge pull request #791 from logto-io/charles-log-2403-store-get-started-progress-in-settings-config
feat(console): support persisting get-started progress in settings config
2022-05-11 17:52:26 +08:00
renovate[bot]
87a9f8a2ae
chore(deps): update dependency @silverhand/eslint-config to ^0.11.0 (#775)
* chore(deps): update dependency @silverhand/eslint-config to ^0.11.0

* chore: add comments

* fix: lockfile

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Gao Sun <gao@silverhand.io>
2022-05-11 06:13:06 +00:00
Charles Zhao
43b2309c99
feat(console): support persisting get-started progress in settings config 2022-05-11 14:02:26 +08:00
Gao Sun
1a664beeee
ci: init integration test (#771)
* ci: init integration test

* ci: complete integration test setup

* ci: remove pull request trigger
2022-05-10 15:29:53 +08:00
Renovate Bot
43db7374c9
chore(deps): update dependency @silverhand/ts-config to ^0.11.0 2022-05-09 16:15:27 +00:00
Gao Sun
6a5e5799d0
refactor(core): update app running info (#765)
* refactor(core): update app running info

* refactor(core): per review
2022-05-09 16:03:06 +00:00
Darcy Ye
e71cf7ea67
feat(core): separate social sign-in api (#735)
* feat(core): separate social sign-in api

* feat(core): rename APIs
2022-05-07 10:50:37 +08:00
Xiao Yijun
6ac70c5eb7
refactor(core): guard phone number with digital-only regex (#744) 2022-05-06 09:23:17 +00:00
Gao Sun
5909727ebc
refactor(core): use argon2 for password encryption (#738)
* refactor(core): use argon2 for password encryption

* refactor(core): adjust time cost
2022-05-06 16:38:38 +08:00
Gao Sun
9ca2815452
docs: configuration 2022-05-06 11:09:27 +08:00
Gao Sun
4400d8d25e
docs: init configuration 2022-05-06 11:08:13 +08:00
Wang Sijie
8a48fb6225
fix: delete custom domain (#737)
* fix: delete custom domain

* fix: use sql wrapper
2022-05-06 02:48:34 +00:00
Gao Sun
3b17324d18
fix: lint:report script (#730) 2022-05-05 10:26:30 +00:00
Wang Sijie
a0b4b98c35
feat(console): add column lastSignIn in user management (#679)
* feat(core): user last sign in

* fix(core): rename last_sign_in to last_sign_in_at for updating its timestamptz value

* fix: rename column name in frontend

* fix: test

* fix: toLocaleDateString

Co-authored-by: IceHe.xyz <icehe@silverhand.io>
2022-05-05 16:22:43 +08:00
IceHe.xyz
0ecb7e4d2f
feat(core,schemas): log IP and user agent (#682)
* feat(core,schemas): log IP and user agent

* refactor(core): extract initLog from koaLog

* refactor(core): log koa

log koa

* fix(core): rename

rename

* refactor(core): initLogger

Co-authored-by: simeng-li <simeng@silverhand.io>
2022-05-05 15:38:59 +08:00
IceHe.xyz
4521c3c8d1
feat(core,schemas): save application id that the user first consented (#688)
* feat(core,schemas): save application id which the user first consented

* chore(core): fix grammatical mistake and typos
2022-05-05 06:57:20 +00:00
Darcy Ye
d989785658
feat(core): remove code redundancy 2022-04-29 11:57:56 +08:00
Darcy Ye
c6f2546126
feat(core): fix connectors' initialization 2022-04-29 11:31:07 +08:00
Gao Sun
e61dba90a8
fix(core): remove ESM declaration (#687) 2022-04-28 04:18:03 +00:00
Gao Sun
d108f4b883
fix(core): set module in base config (#685) 2022-04-28 03:58:14 +00:00
Gao Sun
6738b6a088
refactor(core): use esm in core (#681) 2022-04-28 11:19:38 +08:00
IceHe.xyz
7278ba4095
fix(core): update timestamp field with millisecond precision (#677) 2022-04-27 17:02:21 +08:00
Gao Sun
0fbca8be4b
refactor(core): add manyRows() for queries (#665) 2022-04-26 17:26:50 +08:00
Gao Sun
f5c7faf775
refactor: move cli -> core 2022-04-26 14:11:15 +08:00
IceHe.xyz
a10b427c87
feat(core,schemas): log register (#601) 2022-04-26 03:49:11 +00:00
IceHe.xyz
3aa4342f2e
feat(core,schemas): make it type-safer to log (#656) 2022-04-26 11:31:07 +08:00
Gao Sun
1636f10f30
chore: align author (#657) 2022-04-25 03:26:41 +00:00
renovate[bot]
25814d92ef
fix(deps): update dependency slonik to v28 (#649)
* fix(deps): update dependency slonik to v28

* fix: build

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Gao Sun <gao@silverhand.io>
2022-04-24 10:34:18 +00:00
Gao Sun
2d7918a224
feat(jest-config): init package (#644)
* feat(jest-config): init package

* chore(deps): upgrade `@types/jest`

* fix(core): add jest-matcher dependency

add jest-matcher dependency

Co-authored-by: simeng-li <simeng@silverhand.io>
2022-04-24 18:02:18 +08:00
simeng-li
fefe566044
fix(core): remove useless todo comment (#653)
remove useless todo comment
2022-04-24 14:39:07 +08:00
renovate[bot]
88e58b8b0c
fix(deps): update dependency jose to v4 (#646)
* fix(deps): update dependency jose to v4

* fix(deps): update jose usage

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Gao Sun <gao@silverhand.io>
2022-04-24 13:55:47 +08:00
renovate[bot]
f846872dc5
fix(deps): update dependency koa-body to v5 (#647)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-24 13:52:02 +08:00
Gao Sun
61d1964506
refactor(core): allow read private key from env (#629) 2022-04-24 05:47:45 +00:00
Gao Sun
ef60a474f6
refactor: allow start from project root (#630) 2022-04-24 12:12:48 +08:00
Wang Sijie
96848e6b0f
feat(console): page settings (#612) 2022-04-24 11:46:35 +08:00
Gao Sun
8cf7f3643f
Merge pull request #628 from logto-io/gao-log-2254-add---no-inquiry-option-to-directly
refactor(core): add `--no-inquiry` option
2022-04-24 09:55:42 +08:00
Gao Sun
0a21303b41
refactor: align node version (#625) 2022-04-24 09:50:59 +08:00
renovate[bot]
fbc8bed6a4
fix(deps): update dependency i18next to v21 (#645)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-23 23:58:54 +08:00
renovate[bot]
06d1f1e906
chore(deps): update dependency openapi-types to v11 (#635)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-23 23:54:45 +08:00
renovate[bot]
e03426b36d
chore(deps): update dependency tsc-watch to v5 (#637)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-23 23:53:37 +08:00
renovate[bot]
7b485aebab
chore(deps): update dependency lint-staged to v12 (#634) 2022-04-22 16:46:39 +00:00
Gao Sun
4481c2b351
refactor(core): add --no-inquiry option 2022-04-22 18:24:50 +08:00
renovate[bot]
4399dea218
fix(deps): update dependency dotenv to v16 (#624)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-22 18:07:35 +08:00
Gao Sun
6a62e32fa5
refactor(core): inquire when required env not found (#586)
* refactor(core): inquire when required env not found

* refactor(core): add comments for create DB pool
2022-04-21 16:13:59 +08:00
IceHe.xyz
4ba37e7e73
feat(core,schemas): log sign-in (#594)
* feat(schemas): sign-in log types

* feat(core): log username-password sign-in

* feat(core): log passwordless sign-in

* feat(core): log social sign-in
2022-04-21 15:07:54 +08:00
Wang Sijie
8e13dd5746
feat(console): user role select (#589) 2022-04-21 12:38:54 +08:00
IceHe.xyz
e21d8d38f3
chore(core,schemas): remove old user logs (#597)
* chore(core): remove user logs

* chore(schemas): remove user logs
2022-04-21 11:04:34 +08:00
IceHe.xyz
7990b813ab
refactor(core,phrases,schemas): move language enum and fix Chinese enum value (#593) 2022-04-21 10:55:06 +08:00
Gao Sun
7e14ccb1a9
refactor(core): per comment 2022-04-20 15:59:14 +08:00
Gao Sun
f4a656300e
fix: rebase error 2022-04-20 15:56:43 +08:00
Gao Sun
dff23b57db
refactor(core): move database pool into env set 2022-04-20 15:56:38 +08:00
IceHe.xyz
d4e241b661
refactor(core): remove deprecated koa-user-log middleware (#591)
* refactor(core): remove koa-user-log middleware

* refactor(core): remove user-log queries
2022-04-20 15:11:43 +08:00
IceHe.xyz
4491eab5b4
feat(core): koa-log middleware (#590) 2022-04-20 06:56:33 +00:00
IceHe.xyz
0560928ca4
refactor(core): rename functions to avoid naming conflicts (#588) 2022-04-20 14:28:46 +08:00
Gao Sun
08ce66f317
refactor(core): use SSOT for env variables (#578)
* refactor(core): use SSOT for env variables

* fix(core): tests
2022-04-20 14:14:37 +08:00
IceHe.xyz
3dc07312a0
feat(core): insert log into DB (#587) 2022-04-20 12:28:56 +08:00
IceHe.xyz
608f667963
test(core): separate the color validation cases from tests of sign-in experience (#577)
* test(core): hexColorRegEx

* test(core): sign-in experience branding colors
2022-04-20 12:08:55 +08:00
Xiao Yijun
975e715c47
fix(core): revert add oidc config to application response (#566) 2022-04-18 22:30:57 +08:00
simeng-li
f1576b9916
fix(core): fix sign-in settings api route (#564)
* fix(core): fix sign-in settings api route

fix sign-in settings api route

* test(ui): add ut

add ut

* fix(core): fix ut

fix ut
2022-04-18 15:24:34 +08:00
IceHe.xyz
3da3309cbf
refactor(core,schemas): pascalcase enum keys (#558)
* refactor(schemas): pascalcase enum keys

* chore(core): pascalcase enum keys
2022-04-18 05:35:48 +00:00
IceHe.xyz
1ef04bd45d
refactor(core): clear mocks after each test (#559) 2022-04-18 12:50:49 +08:00
Darcy Ye
14cdddc18e
feat(core): add connector config examples (#551) 2022-04-14 17:20:41 +08:00
IceHe.xyz
a9466667c0
refactor(core): post application (#552) 2022-04-14 15:54:21 +08:00
Xiao Yijun
d238168ebf
feat(core): add oidc config to the response of application apis (#536) 2022-04-14 14:48:56 +08:00
Darcy Ye
2f22a81a8f
feat(core): add Alipay web connector (#522) 2022-04-14 12:22:30 +08:00
simeng-li
f0a961225d
refactor(core): phone method refactor (#537)
* refactor(core): rename signin method phone with sms

replace phone signin method with sms

* refactor(ui): rename api method

rename api method

* fix(ui): cr fix rename method

rename method

* fix(ui): update naming convention

update naming convention
2022-04-14 11:26:10 +08:00
Charles Zhao
3767229389
Merge pull request #543 from logto-io/charles-log-1943-connectors-get-started
feat(console): connectors get-started page
2022-04-13 20:14:16 +08:00
Charles Zhao
eeeb80ba4b
feat(console): connectors guide page 2022-04-13 20:09:25 +08:00
IceHe.xyz
c3c2bf20f1
feat(core): validate custom client metadata when post or patch application (#529) 2022-04-13 15:23:04 +08:00
Charles Zhao
a710ec6ba5
feat(core): add connector config json templates 2022-04-12 16:59:19 +08:00
simeng-li
85c9eabfca
feat(core): add sign-in-settings api for client use (#534)
add sample sign-in-settigns api for client use
2022-04-12 12:05:29 +08:00
IceHe.xyz
26c3e1fe2c
fix(core): extraClientMetadata properties (#530) 2022-04-11 14:22:16 +08:00
Gao Sun
06ff890358
fix(core): test cases 2022-04-09 22:06:41 +08:00
Gao Sun
ada4da2fbf
feat(cli): seed tables 2022-04-09 21:53:53 +08:00
IceHe.xyz
fb65c65893
feat(core,schemas): cors allowed origins (#507)
* feat(schemas): cors allowed origins of application in custom OIDC client metadata

* refactor(schemas): rename CustomClientMetadataType to CustomClientMetadataKey

* feat(core): cors allowed origins
2022-04-08 18:16:20 +08:00
IceHe.xyz
5625b8838c
refactor(core): split mock.ts into __mocks__/*.ts (#510)
* chore(core,ui): coverage ignore src/__mocks__/

* chore(core): build excludes src/__mocks__/

* refactor(core): split mock.ts into __mocks__/*.ts
2022-04-08 09:47:09 +00:00
Gao Sun
0499024fdf
refactor(core): remove resource scopes 2022-04-08 16:07:34 +08:00
IceHe.xyz
7eb2e41936
refactor(core): remove find-many (#511) 2022-04-07 21:16:59 +08:00
IceHe.xyz
e969e15e3e
test(core): guard sign-in methods and social connector ids (#498)
* test(core): sign-in-methods guard of sign-in experience

* test(core): social-sign-in-connector-ids guard of sign-in experience

* test(core): guard branding of sign-in experience
2022-04-07 12:18:27 +08:00
IceHe.xyz
9d15b584ca
test(core): guard terms of use and language info (#497)
* test(core): terms-of-use guard of sign-in experience

* test(core): add null test cases for guards of sign-in experience

* test(core): language-info guard of sign-in experience
2022-04-07 12:04:09 +08:00
IceHe.xyz
9e25a097bb
test(core): guard branding of sign-in experience (#494)
* chore(core,ui): upgrade jest related dev dependencies to latest versions

* test(core): branding guard of sign-in experience
2022-04-07 11:56:21 +08:00
IceHe.xyz
b0de73a4a1
test(core): get sign-in experience (#499) 2022-04-07 11:42:20 +08:00
Gao Sun
4a904f2953
ci: upload eslint annotations (#490)
* ci: upload eslint annotations

* ci: update `upload-annotations.yml`
2022-04-06 06:06:34 +00:00
IceHe.xyz
71465ca999
feat(schemas,core,phrases)!: add type to connector schema and sync to DB (#491)
* feat(schemas,core,phrases)!: add type in connector schema and sync to DB

* chore(core): fix code about connector type
2022-04-06 12:11:06 +08:00
IceHe.xyz
812841494a
feat(core): update social sign-in connector IDs only when social sign-in is enabled (#488) 2022-04-02 11:34:55 +08:00
IceHe.xyz
58d03ae715
feat(core,phrases): validate social sign-in method with social connector IDs (#485) 2022-04-01 17:57:29 +08:00
IceHe.xyz
efdb24833e
feat(core,phrases): validate sign-in methods with enabled connectors (#480) 2022-04-01 16:32:45 +08:00
IceHe.xyz
bf94ee2d10
feat(core,phrases): validate there must be one and only one primary sign-in method (#475) 2022-04-01 13:52:01 +08:00
IceHe.xyz
2356c2ae2e
feat(core): validate sign-in experience branding and terms of use (#477) 2022-04-01 13:40:32 +08:00
Darcy Ye
2a153c2b6d
feat(core): add wechat-native connector (#470)
* feat(core): add wechat-native connector

* feat(core): add wechat native getAuthorizationUri UT
2022-03-31 18:03:51 +08:00
Darcy Ye
004fe65d5a
feat(core): validate connector config before enabling (#478)
* feat(core): validate connector config before enabling

* feat(core): remove code redundancy
2022-03-31 18:02:35 +08:00
Charles Zhao
48bd57c94e
chore: bump version of configs 2022-03-31 15:18:34 +08:00
IceHe.xyz
cd63388ab1
feat(schemas): zod type guards of sign-in experience jsonb fields (#473)
* feat(schemas): guard branding logo url and terms-of-use content url

* feat(schemas): guard branding logo url non-optional

* feat(schemas): guard branding colors and slogan nonempty

* chore(core,schemas): upgrade zod dependency version from 3.8.1 to 3.14.3

* feat(schemas): jsonb types guard hex color values

* feat(core): hex color regex
2022-03-31 14:19:12 +08:00
Darcy Ye
84f30fe04b
fix(core): fix did not mock request error which results in timeouts (#471) 2022-03-30 18:31:42 +08:00
Wang Sijie
10fc7e4205
feat(console): support icon in text-input (#458)
* feat(console): support icon in text-input

* feat(console): user search (#460)

* fix: inputValue empty

* fix: remove contional
2022-03-30 14:01:18 +08:00
Darcy Ye
c0337f502d
fix(core): fix wechat web response code and related UTs (#461) 2022-03-29 23:59:47 +08:00
IceHe.xyz
f260d2bb56
fix(core): error message interpolation (#465) 2022-03-29 21:47:12 +08:00
IceHe.xyz
14ac317358
refactor(core): make initConnectors check existing connectors in DB once (#451)
* refactor(core): make initConnectors check existing connectors in DB once

* refactor(core): remove unnecessary hasConnector
2022-03-25 15:55:51 +08:00
Darcy Ye
82d104a0d3
feat(core): add DELETE /users/:userId/identities/:connectorId (#437)
* feat(core): add DELETE /users/:userId/identities/:connectorId

* feat(core): add user query methods UT cases for better testing coverage

* feat(core): rewrite deletion of connector info from user identities using postgresql operator
2022-03-25 15:48:53 +08:00
IceHe.xyz
2ee88d19ee
refactor(core): make getConnectorInstances access DB only once (#429)
* refactor(core): make getConnectorInstances access DB only once

* test(core): make getConnectorInstances access DB only once

* refactor(core): getConnectorInstanceByType merge .filter into .find for running in one loop
2022-03-25 14:45:34 +08:00
IceHe.xyz
28625f6894
feat(core): order connectors by enabled desc, id asc (#430) 2022-03-25 12:26:42 +08:00
IceHe.xyz
04ba181a64
fix(core): missing some commits (#444) 2022-03-23 18:54:26 +08:00
IceHe.xyz
d9670fd709
refactor(core): get sign-in experience (#426)
* feat(core): getEnabledSocialConnectorIds

* test(core): getEnabledSocialConnectorIds

* refactor(core): get sign-in experience

* test(core): get sign-in experience
2022-03-23 12:44:48 +08:00
Darcy Ye
2e08ec9db0
fix(core): fix response code for requesting wechat APIs (#422) 2022-03-22 09:41:25 +08:00
Charles Zhao
f256c2c38c
feat(core): copy markdown files to build folder when building project 2022-03-21 14:27:44 +08:00
Wang Sijie
c4a0299b1c
feat(console): user details settings (#403) 2022-03-21 11:48:27 +08:00
Darcy Ye
fa757c3d12
feat(core): add wechat-web connector (#394)
* feat(core): add WeChat connector as well as corresponding UTs

* feat(core): move TODO from comment block
2022-03-18 17:39:20 +08:00
IceHe.xyz
c3d447b081
test(core): connectors (#413) 2022-03-18 15:42:03 +08:00
IceHe.xyz
8dd05f776f
chore(core): fix connector typos (#411) 2022-03-17 23:01:15 +08:00
Gao Sun
bfc8a64c44
refactor(console): add dev origin to allowed CORS domain in OIDC (#397) 2022-03-16 16:35:45 +08:00
IceHe.xyz
b288e8eb6c
refactor(core): rename sign-in-experience api paths from sign-in-ex to sign-in-exp (#392) 2022-03-16 15:25:26 +08:00
IceHe.xyz
9f3fc5a5cc
feat(schemas): sign-in-experiences (#361)
* chore(schemas): remove useless table sign_in_methods

* feat(schemas): sign-in-experiences

* chore(core): update mock.ts and sign-in-experience.test.ts about sign-in-experiences schema

* chore(core): fix typo in test
2022-03-15 16:46:23 +08:00
Gao Sun
b9dab8a9da
fix(console): connect sign in with core 2022-03-15 13:46:50 +08:00
Wang Sijie
6640c0c18d
feat(console): markdown component (#378) 2022-03-15 11:31:50 +08:00
Darcy Ye
f2bfc30ef9
feat(core): fix connector route tests (#377) 2022-03-14 14:06:34 +08:00
Darcy Ye
cde61b77b1
feat(core): add README.md for connectors (#362)
* feat(core): add README.md for connectors

* feat(core): add README.md files' existence check

* feat(core): fix path of README.md
2022-03-14 11:17:24 +08:00
Xiao Yijun
043b20a05a
feat(console): connector sender test (#367) 2022-03-14 11:11:37 +08:00
Darcy Ye
9ed146645b
revert(core): manually revert forgot password logic (#365)
* Revert "feat(core): add email forgot password flow (send/verify passcode) (#336)"

* Revert "feat(core): post /session/forgot-password/phone/verify-passcode-and-reset-password (#334)"

* Revert "feat(core): add forgot password send a passcode to phone route (#326)"
2022-03-11 17:45:42 +08:00
Gao Sun
38df1ec8f4
chore: upgrade packages 2022-03-11 16:30:22 +08:00
IceHe.xyz
4eb2c6ca42
feat(core): findAllApplications order by createdAt desc (#344)
* feat(core): find many data order by

* test(core): find many data order by

* feat(core): findAllApplications order by createdAt desc

* test(core): findAllApplications order by createdAt desc
2022-03-10 15:50:05 +08:00
Wang Sijie
223b8a2444
feat(console): connector config (#358)
* feat(console): connector config

* fix(console): page layout issues

* feat(console): saved toast

* fix: style lint

Co-authored-by: Charles Zhao <charleszhao@silverhand.io>
2022-03-10 06:47:32 +00:00
Darcy Ye
811fe39852
feat(core): add email forgot password flow (send/verify passcode) (#336)
* feat(core): add email forgot password flow (send/verify passcode)

* feat(core): reset password once passcode verification succeed

* feat(core): remove username+password existence check

* feat(core): fix phone not exist error code
2022-03-10 14:15:20 +08:00
Darcy Ye
67aad46a2c
test(core): add UTs for connector route (#357) 2022-03-10 11:54:33 +08:00
Darcy Ye
9e677ca97a
feat(core): post /session/forgot-password/phone/verify-passcode-and-reset-password (#334)
* feat(core): add post /session/forgot-password/phone/verify-passcode and UT

* feat(core): reset password once passcode verification succeed
2022-03-08 16:09:06 +08:00
Gao Sun
1399c9258e
chore: upgrade configs (#339) 2022-03-08 15:58:55 +08:00
Wang Sijie
4cc45696a8
feat(core): only allow one enabled sms/email (#337) 2022-03-08 15:57:57 +08:00
IceHe.xyz
31779e0a3d
feat(core): facebook connector (#321)
* feat(core): facebook connector

* test(core): facebook connector
2022-03-08 12:39:55 +08:00
Wang Sijie
387ee50684
feat(console): init connectors (#332) 2022-03-08 11:10:46 +08:00
IceHe.xyz
fc113fba99
refactor(core): simplify check-and-throw-ConnectorError with assertThat (#333) 2022-03-07 16:08:05 +08:00
Darcy Ye
b14c30beca
feat(core): add forgot password send a passcode to phone route (#326)
* feat(core): add forgot password send a passcode to phone route

* feat(core): add UT for forget password send passcode to phone flow
2022-03-07 15:10:36 +08:00
Wang Sijie
12769e277b
feat(console): init connector page (#331) 2022-03-07 13:58:07 +08:00
IceHe.xyz
607a5344c2
chore(core): add TODO comments for adding the real connector logo URL (#330) 2022-03-07 13:49:57 +08:00
IceHe.xyz
c42b2a5a67
refactor(core): remove unnecessary check in github and aliyun-sms connector (#329) 2022-03-07 13:41:28 +08:00
IceHe.xyz
3dd7d496ef
test(core): fix typos in connectors/*/index.test.ts (#328) 2022-03-07 12:01:24 +08:00
Gao Sun
bb1d3c0a37
feat(console): retrieve applications from api (#320)
* feat(console): retrieve applications from api

* fix(console): i18n key

* fix(console): update per review
2022-03-04 17:26:34 +08:00
Gao Sun
9e0f60ebc8
fix(console): set base url when needed (#312)
* fix(console): set base url when needed

* fix(console): replace `a` with `Link`

* refactor(console): update var name
2022-03-03 15:44:42 +08:00
Gao Sun
365c63b2c7
feat(core): connect console (#306)
* feat(core): connect console

* fix(core): prod spa dist

* fix(core): test

* test(core): refactor spa proxy tests
2022-03-03 14:25:32 +08:00
Darcy Ye
5734333dea
test(core): add UT for aliyun sms (#305)
* test(core): add UT for aliyun sms

* test(core): define some params as top-level consts
2022-03-02 16:50:26 +08:00
Xiao Yijun
8ae42e9666
feat(core): google connector (#300) 2022-03-02 16:26:07 +08:00
Xiao Yijun
dcd84086f6
refactor(core): slonik error handling (#307) 2022-03-02 15:44:57 +08:00
Darcy Ye
16396cf231
test(core): add UTs for session routes (#299)
* test(core): add email not exists check to sign-in email code verification

* test(core): add remaining UTs except for /session/consent

* test(core): fix username validity check according to new username rules

* test(core): remove UT for /session/consent as an individual PR

* test(core): fix error code 500
2022-03-02 14:16:09 +08:00
IceHe.xyz
c5a9eef852
chore(core): fix typos (#303)
* chore(core): fix typos in routes/session.ts

* chore(core): fix typos in utils/password.ts

* chore(core): fix Connector typos

* chore(core): fix typos in connectors/utilities/aliyun.ts

* chore(core): fix 'custom' typos in database/update-where.test.ts

* chore(core): fix typos in middleware/koa-oidc-error-handler.ts
2022-03-02 12:24:07 +08:00
Wang Sijie
ba2b499637
test(core): session consent (#304) 2022-03-02 11:24:15 +08:00
Wang Sijie
4d7ea642a0
refactor(core): session tests (#302) 2022-03-01 17:03:41 +08:00
simeng-li
b03a666fde
ci(core): add codecov github action (#297)
* ci(core): add codecov github action

add codecov github action

* ci(core): update codecov uploader

update codecov uoloader

* ci(core): delete useless codecov yml

delete codecov yml

* chore(core): remove deprecated packages

remove deprecated pacakages
2022-03-01 11:05:25 +08:00
Wang Sijie
7af6973079
test(core): aliyun-dm (#295) 2022-03-01 11:04:20 +08:00
Gao Sun
f7925d9332
chore: upgrade configs and eslint (#294)
* chore: upgrade configs and eslint

* chore: update lockfile

* fix(ui): stylelint
2022-02-28 15:21:48 +08:00
simeng-li
fb6a1dc236
test(core): add ut for queires (#287)
* test(core): add ut for queires

add ut for queries

* test(core): add user query ut

add user query ut

* fix(core): remove test code

remove console log
2022-02-28 14:30:27 +08:00
Wang Sijie
c9400d0a4d
test(core): github and connector utilities (#291) 2022-02-28 06:27:45 +00:00
Xiao Yijun
3a583e81e4
fix(core): patch /users/:userId should not fail if only name or avatar is provided 2022-02-28 13:18:17 +08:00
Xiao Yijun
755176e252
refactor(core): add regex for commonly used fields (#288) 2022-02-28 13:16:02 +08:00
Xiao Yijun
76aba43ae3
refactor(core): replace arbitrary data guard type with arbitrary object guard (#290) 2022-02-28 11:22:48 +08:00
Wang Sijie
94e583111d
test: session route (#283) 2022-02-25 07:09:20 +00:00
Darcy Ye
ddd695dd33
feat(core): enable pass redirectUri when sign-in with social (#284) 2022-02-25 14:52:38 +08:00
simeng-li
2109b7be31
test(core): add ut for application query (#282)
add ut for appliction query
2022-02-25 13:52:29 +08:00
Darcy Ye
5fa6e2b280
chore(core): username/phone/email validity checks to koaGuard middleware (in /session routes) (#285)
* feat(core): all username/phone/email validity checks are put in koaGuard middleware

* feat(core): remove unnecessary comments

* feat(core): unwrap unnecessary methods
2022-02-25 10:50:50 +08:00
Darcy Ye
bd6dc4261c
feat(core): get /session/register/:username/existence (#275)
* feat(core): add username existence check when resgitering

* feat(core): add username existence check

* feat(core): update username guard to avoid empty strings
2022-02-24 18:30:34 +08:00
Darcy Ye
75d2bb3e9b
feat(core): separate passwordless flow routes (#280)
* feat(core): separate passwordless flow routes

* feat(core): rename routes

* feat(core): wrap frequently called methods and rerank log assignment order

* feat(core): rerank log assignment order
2022-02-24 18:21:59 +08:00
Xiao Yijun
861833c01a
refactor(core): add prefix for password_encryption_method (#281) 2022-02-24 18:01:17 +08:00
Xiao Yijun
4144051cad
test(core): add ut for admin-user (#279) 2022-02-24 17:59:08 +08:00
Xiao Yijun
e63ca4c06f
feat(core): get /users with search (#270) 2022-02-24 12:29:34 +08:00
Darcy Ye
89a185c845
chore(core): refactor sign-in routes (#273)
* chore(core): refactor sign-in routes

* feat(core): fix order of userLog assignments
2022-02-24 11:58:52 +08:00
Wang Sijie
be916b274c
test(session): test setup for session route (#276) 2022-02-23 17:23:21 +08:00
Wang Sijie
c033c5e4ec
chore: rename route for bind and sign in (#277) 2022-02-23 16:17:42 +08:00
Darcy Ye
fe0ece4e49
chore(core): hide settings default id (#261)
* chore(core): hide settings default id

* chore(core): fix patch /settings UT
2022-02-23 13:51:02 +08:00
simeng-li
d2b8aa9355
test(core): update the requester test utils (#274)
update the requester test utils
2022-02-23 11:09:26 +08:00
simeng-li
279318780e
test(oidc): add oidc adapter test case (#266)
add oidc adapter test case
2022-02-23 09:42:29 +08:00
simeng-li
4a80773b2d
feat(core): add koa user role guard middleware (#255)
* feat(core): add koa user role guard middleware

add user role guard middleware

* fix(core): resolve cr comments

remove getUserInfo

* fix(cr): cr fix

cr fix
2022-02-23 09:41:55 +08:00
Darcy Ye
ab4beadd70
chore(core): refactor register codes (#271)
* chore(core): refactor register routes

* chore(core): remove unnecessary lib/register

* chore(core): fix
2022-02-22 22:12:38 +08:00
Gao Sun
b31e90dab2
refactor(core): use custom koa-router types (#267) 2022-02-22 08:33:55 +00:00
Wang Sijie
9ffe12ad0d
chore: make connectorInstance.connector non-nullable (#268) 2022-02-22 16:01:47 +08:00
Wang Sijie
bdee44a6b9
feat: continue to register with social (#249)
* feat: continue to register with social

* feat: bind social account (#259)

* feat: continue to register with social

* feat: bind social account

* feat: find social related user and sign in (#258)
2022-02-22 08:01:32 +00:00
simeng-li
d58b29f4a9
test(core): add ut for core routers (#262)
add ut for core router
2022-02-21 16:42:48 +08:00
simeng-li
7488bc7e17
test(core): add ut for util methods (#264)
add ut for util methods
2022-02-21 16:42:17 +08:00
simeng-li
8fa169cba1
test(core): add admin-user route UT (#252)
* test(core): add admin-user route ut

add admin-user route ut

* fix(ut): remove redundent code

remove mockKoaAuthMiddleware

* feat(core): update pnpm.lock

update pnpm.lock
2022-02-21 10:45:31 +08:00
Gao Sun
47ccb4da02
refactor(ui): integrate new ui (#260) 2022-02-20 14:12:07 +08:00
Xiao Yijun
5731d7389d
refactor(core): remove user route (#254) 2022-02-18 17:56:44 +08:00
Xiao Yijun
9e30b41028
feat(core): delete user and update user password api (#248) 2022-02-18 17:02:08 +08:00
simeng-li
9c3f017704
test(core): add more middleware tests [2 of 2] (#247)
* test(core): add more middleware tests

add more middleware tests

* fix(ut): fix koaUserInfo ut

fix koaUserInfo ut

* fix(ut): fix ut

fix ut

* fix(ut): revert chagnes

revert changes

* fix(ut): fix ut fail after schema update bug

fix ut fail after schema update bug
2022-02-18 16:25:32 +08:00
Xiao Yijun
77b520deba
feat(core): patch /users/:userId (#246) 2022-02-18 14:34:22 +08:00
Darcy Ye
c99c6b55aa
feat(core): separate sessionRoutes by flow types (#235)
* feat(core): separate sessionRoute by use cases as well as flow types

* feat(core): fix API calls in UI accordingly

* feat(core): fix lint errors
2022-02-18 12:31:15 +08:00
simeng-li
c8d45a13f0
test(core): add middleware tests [1 of 2] (#244)
* test(core): add middleware tests

add middleware tests

* fix(ut): fix typo

fix typo
2022-02-17 14:21:29 +08:00
Xiao Yijun
c1c356c30a
feat(core): delete users/:userid/custom-data (#233) 2022-02-17 14:10:26 +08:00
Wang Sijie
46dd8f3b69
chore: connector error (#242) 2022-02-17 11:09:27 +08:00
Gao Sun
13f6b59ad4
chore: upgrade configs (#243) 2022-02-16 19:06:58 +08:00
Xiao Yijun
d69bbeebb2
feat(core): patch /user/:userId/custom-data (#232) 2022-02-16 18:06:08 +08:00
Xiao Yijun
56c9f00440
feat(core): post /users (#238) 2022-02-16 16:34:32 +08:00
Xiao Yijun
dd55c66644
feat(core): get (#236) 2022-02-16 15:56:51 +08:00
Xiao Yijun
ee49880845
feat(core): get /users (#237) 2022-02-16 15:55:08 +08:00
Gao Sun
eb319a3b89
refactor: upgrade TypeScript (#241) 2022-02-16 15:17:43 +08:00
Wang Sijie
e206dfcecb
fix: connector_id_mismatch and mergeWithLastSubmission (#240) 2022-02-16 14:43:01 +08:00
simeng-li
080bee6935
test(i18n): add detectLanguage util test (#231)
add detectLanguage util test
2022-02-16 10:26:16 +08:00
simeng-li
af89e9ac30
test(core): add ut for app (#227)
* test(core): add ut for app

add ut for app

* fix(jest): remove jest setup

remove jest setup

* fix(ut): mock env viriables

mock env viriables

* refactor(ut): add env variable test utils

add env variable test util

* fix(core): fix rebase issue

fix rebase issue

* fix(ut): update app ut

update app ut

* fix(core): remove supertest dependency

remove supertest

* fix(ut): cr fix

cr fix
2022-02-15 18:36:57 +08:00
simeng-li
108705076f
test(ut): add error type ut (#229)
add error type ut
2022-02-15 18:11:23 +08:00
Wang Sijie
34e540d3ed
feat: continue social sign in (#223)
* feat: social sign in

* feat: social register

* feat: continue social sign in
2022-02-15 17:40:47 +08:00
Xiao Yijun
e8cbe00d3a
feat(core): add custom_data to the user schema (#230) 2022-02-15 16:59:28 +08:00
simeng-li
86ce5a9640
fix(core): align resource_identifier namespace with OIDC provider (#224)
* fix(core): align resource_identifier namespace with OIDC provider

replace resource identifier name with resource_indicator
align the usage with OIDC Provider

* fix(cr): cr fix

add empty line
2022-02-15 16:13:41 +08:00
simeng-li
4325007398
refactor(core): throw error on pagination middleware (#228)
throw internal error if no totalCount returned
2022-02-15 10:58:21 +08:00
Wang Sijie
a9b5dd6cbd
feat: update social info on sign in (#225) 2022-02-14 16:11:42 +08:00
Wang Sijie
e8c2b100a3
feat: set profiles from social connector (#226) 2022-02-14 16:03:13 +08:00
simeng-li
cdcadb968f
refactor(core): refactor error handler logic (#220)
* refactor(core): refactor error handler logic

add oidc and slonik custom error handler

* fix(core): fix typo

fix type

* refactor: align core errors

align some old core error definitions
2022-02-14 11:50:47 +08:00
Wang Sijie
78cc86ec77
feat: social register (#222) 2022-02-14 03:11:34 +00:00
Darcy Ye
8249493c40
feat(core): add passwordless register flow of phone (#221)
* feat(phone passwordless): add passwordless register flow of phone

* feat(phone passwordless): add userId to both sign-in and register user logs

* feat(phone passwordless): add register error descriptions

* feat(core): update error descriptions and leave redundancy error descriptions for later changes
2022-02-14 10:44:46 +08:00
Wang Sijie
66808d6d02
feat: social sign in (#218) 2022-02-11 07:19:18 +00:00