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

444 commits

Author SHA1 Message Date
Gao Sun
a66890dc53
refactor(core): use consts for session prefix (#1811)
* refactor(core): use consts for session prefix

* refactor(core): fix session route util
2022-08-24 22:49:05 +08:00
Gao Sun
a2043a6804
Merge pull request #1810 from logto-io/gao-log-3981-core-check-sign-in-mode-and-guard
feat(core): guard session with sign-in mode
2022-08-24 14:26:57 +08:00
Gao Sun
1d412662b6
refactor(core): fix test 2022-08-23 20:03:07 +08:00
Xiao Yijun
224ba4c608
refactor(core): flatten router parameter context types (#1809) 2022-08-23 18:42:39 +08:00
Gao Sun
a8a3de3544
feat(core): guard session with sign-in mode 2022-08-23 18:29:05 +08:00
Gao Sun
3d6763934f
refactor(core): session routes 2022-08-23 17:34:00 +08:00
Gao Sun
35a4b7289a
refactor: watch all packages when dev (#1796) 2022-08-22 14:58:39 +08:00
Gao Sun
4afdf3cb4c
feat(core): set user default roles from env (#1793) 2022-08-19 16:53:19 +08:00
Gao Sun
87d3a53b65
feat(core): hasura authn (#1790)
* feat(core): hasura authn

* refactor(core): fix test error
2022-08-18 14:10:17 +00:00
Gao Sun
2c6171c2f9
refactor(core,console)!: remove /me apis (#1781)
* refactor(core,console)!: remove `/me` apis

* fix(phrases): add missing fr phrase
2022-08-15 20:45:29 +08:00
Gao Sun
08bea22195
chore(deps): upgrade packages (#1738)
* chore(deps): upgrade packages

* refactor: update per lint report

* chore(deps): upgrade configs

* fix(ui): lint rules compatibility

* chore: remove unused override

* chore(deps): upgrade jest config
2022-08-05 05:58:31 +00:00
IceHe.Life
3b7f86e2a2
refactor(core): replace deprecated .nonempty() with .min(1) for ZodString (#1727) 2022-08-03 15:20:34 +08:00
Wang Sijie
543ee04f53
feat(core,schemas): add application secret (#1715) 2022-08-02 16:18:50 +08:00
Darcy Ye
fe5a10e92e
chore(connector): fix connector validator type (#1667) 2022-07-25 13:51:59 +08:00
IceHe.life
379410e090
refactor(test): remove unnecessary expect.objectContaining (#1659) 2022-07-22 18:10:30 +08:00
Gao Sun
4bf6483ff4
feat(core): api GET /me (#1650) 2022-07-21 13:35:39 +00:00
simeng-li
c56ddec84a
fix(core): resolve some core no-restricted-syntax lint error (#1606)
* fix(core): resolve some core no-restricted-syntax lint error

resolve some core no-restricted-syntax lint error

* fix(core): cr fix
2022-07-20 10:28:48 +00:00
IceHe.xyz
0ed9452cc7
refactor(core): remove unused getEnabledSocialConnectorIds (#1585) 2022-07-18 18:28:10 +08:00
Gao Sun
6c39790180
feat(core): add response guard (#1542)
* feat(core): add response guard

* refactor(core): print error if not prod
2022-07-15 17:01:51 +08:00
simeng-li
6b58d8a161
fix(ui,core): fix i18n issue (#1548)
* fix(ui,core): fix i18n issue

fix i18n issue

* fix(core): cr fix

cr fix
2022-07-14 13:36:32 +00:00
Darcy Ye
6b9ad580ae
fix(connector): refactor ConnectorInstance as class (#1541) 2022-07-14 07:56:57 +00:00
Darcy Ye
0297f6c52f
fix(connector): passwordless connector send test msg with unsaved config (#1539)
* fix(connector): passwordless connector sendTestMsg with unsaved config

* refactor: apply suggestions from code review

Co-authored-by: Gao Sun <gao@silverhand.io>
2022-07-14 00:16:19 +00:00
Darcy Ye
88a54aaa9e
fix(connector): fix connector getConfig and validateConfig type (#1530) 2022-07-14 00:12:01 +08:00
IceHe.xyz
434e97d5cf
chore: bump eslint-config and eslint-config-react 0.15.0 (#1521)
* chore: bump eslint-config 0.15.0

* chore: bump eslint-config-react 0.15.0

* style: no explicit any
2022-07-12 23:00:05 +08:00
simeng-li
3e76de0ac9
feat(core): add admin guard to signin (#1523)
* feat(core): add admin guard to signin

add admin guard to signin

* fix(core): cr update

cr update

* fix(core): naming update

naming update
2022-07-12 13:58:02 +00:00
Xiao Yijun
acefafed72
refactor: rename DTO -> Dto (#1522) 2022-07-12 18:35:51 +08:00
Darcy Ye
82ed2fe169
chore: remove TODOs with linear issues (#1495)
* chore: remove TODOs with linear issues

* chore: remove simeng TODOs

* chore: remove simeng TODOs
2022-07-08 14:47:55 +00:00
Wang Sijie
be0d9326e4
refactor(core): remove InvalidInputError (#1477) 2022-07-08 17:19:53 +08:00
simeng-li
78e06d5c7f
fix(core): add session check (#1453)
add session check
2022-07-08 10:38:24 +08:00
simeng-li
d5d6c5ed08
fix(core,ui): remove todo comments (#1454)
remove todo comments
2022-07-07 18:10:46 +08:00
IceHe.xyz
100bffbc6a
feat(core): append additional yaml responses to swagger.json (#1407) 2022-07-07 09:48:46 +00:00
IceHe.xyz
5559fb10c3
fix(core): do not titlize tags of .well-known APIs (#1412) 2022-07-05 04:33:47 +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
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
Wang Sijie
a4d0a940bd
feat(core,console): change admin user password (#1268) 2022-06-29 03:13:26 +00: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
Wang Sijie
2c413341d1
feat(console): sie form reorg (#1218) 2022-06-24 02:26:30 +00:00
Charles Zhao
98d3f64d46
refactor: email/sms connector test API 2022-06-23 17:58:28 +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
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
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
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
Wang Sijie
a790248c09
fix(core): remove name regex (#1109) 2022-06-14 11:36:03 +08:00
IceHe.xyz
75ac874a2d
feat(core): dau curve contains 0 count points (#1105) 2022-06-13 16:18:16 +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
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
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
d4f38bce2b
feat(core): add etag for settings api (#1011) 2022-06-01 16:56:23 +08: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
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
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
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
IceHe.xyz
5d7f2e436c
refactor(core,schemas): remove passcode in logs (#916) 2022-05-20 17:04:22 +00:00
Xiao Yijun
d65999514f
fix(core): update role names (#913) 2022-05-20 17:59:55 +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
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
IceHe.xyz
e9e7efdc92
refactor(core): move GET /sign-in-settings out of sessionRouter (#875) 2022-05-19 11:24:42 +08:00
Xiao Yijun
85a407c5f6
feat: update field check rules (#854) 2022-05-18 04:12:51 +00:00
Wang Sijie
664a2180a5
feat(console): dark logo (#860) 2022-05-18 10:25:20 +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
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
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
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
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
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
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
Wang Sijie
8a48fb6225
fix: delete custom domain (#737)
* fix: delete custom domain

* fix: use sql wrapper
2022-05-06 02:48:34 +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
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
c6f2546126
feat(core): fix connectors' initialization 2022-04-29 11:31:07 +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
Wang Sijie
96848e6b0f
feat(console): page settings (#612) 2022-04-24 11:46:35 +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
7990b813ab
refactor(core,phrases,schemas): move language enum and fix Chinese enum value (#593) 2022-04-21 10:55:06 +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
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
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
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
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
Gao Sun
06ff890358
fix(core): test cases 2022-04-09 22:06:41 +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
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
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
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
f260d2bb56
fix(core): error message interpolation (#465) 2022-03-29 21:47:12 +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
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
Wang Sijie
c4a0299b1c
feat(console): user details settings (#403) 2022-03-21 11:48:27 +08:00
IceHe.xyz
8dd05f776f
chore(core): fix connector typos (#411) 2022-03-17 23:01:15 +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
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
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
Wang Sijie
4cc45696a8
feat(core): only allow one enabled sms/email (#337) 2022-03-08 15:57:57 +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
Xiao Yijun
8ae42e9666
feat(core): google connector (#300) 2022-03-02 16:26:07 +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
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
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
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
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
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
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
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
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
Xiao Yijun
c1c356c30a
feat(core): delete users/:userid/custom-data (#233) 2022-02-17 14:10:26 +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
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
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
Darcy Ye
750ef0c3bf
feat(phone passwordless): add passwordless sign-in with phone (#217)
* feat(phone passwordless): add passwordless sign-in with phone

* feat(phone passwordless): rename phoneReg
2022-02-09 16:14:42 +08:00
Wang Sijie
77ca86cac6
feat(core): register with email (#212) 2022-02-08 20:15:36 +08:00
simeng-li
3d550b74dd
feat(core): allow jsonb partial update (#210)
* refactor(core): allow jsonb partial update

allow jsonb partial update

* fix(core): add comments

add comments

* fix(core): add non-nullable case

add non-nullable case assertation

* fix(core): use coalesce

use coalesce

* test(core): add ut

add ut
`
2022-02-04 12:19:59 +08:00
Wang Sijie
d14f1a8841
feat(core): sign in with email (#209)
* feat(core): sign in with email

* fix: jti comment

* refactor: move sign in methods into lib
2022-01-31 11:04:55 +08:00
simeng-li
0105d19d99
feat(core): add user roles related api (#204)
* feat(core): add user role related api

add user roles related api

* fix: insert array to db fix

insert array to db fix

* feat(core): add role related routes config

add role related routes config

* fix(core): update user role patch error type

update user role patch error type

* fix(core): cr fix

cr fix

* fix(core): cr fix
cr fix

* fix(core): cr fix
 cr fix
2022-01-28 13:33:57 +08:00
Charles Zhao
f30cae7377
chore: upgrade eslint-config to v0.6.1 2022-01-27 19:26:34 +08:00
Wang Sijie
5c428efa78
feat: user register (#196) 2022-01-26 13:21:45 +08:00
simeng-li
37f2bab9c0
feat(core): add sign-in experience query and api (#197)
* feat(core): add sign-in experience query and api

add sign-in experience query and api

* fix(core): cr update of sign-in-experience apis

- remove unused queries
- replace hardcoded 'default' id filtering, use pool.one method instead
2022-01-26 11:07:45 +08:00
Darcy Ye
871789e763
chore: align routers return process of updating DB (#193)
* chore: align routers return process of updating DB

* chore: align connector router output
2022-01-25 13:47:12 +08:00
Darcy Ye
9dc0ea32c0
feat(connector): connector queries and APIs (#178)
* feat(connector): connector queries and APIs

* chore(connectors): remove type from DB schema design and fix code accordingly

* chore(connectors): put connector as ConnectorInstance's property

* chore(connector): put connector as optional property of ConnectorInstance
2022-01-24 14:40:15 +08:00
simeng-li
93df7db2ca
refactor(core): enable userinfo endpoint and resource scope consent (#187)
* refactor(core): enable userinfo endpoint and resource scope consent

enable userinfo endpoint and resource scope consent

* fix(core): cr fix add comment

add comment for useGrantedResource settigns reference
2022-01-24 10:13:18 +08:00
simeng-li
99f85ca44c
refactor(schema): rename schema (#182)
* refactor(schema): rename schema

rename schema update to create
rename guard to createGuard

* fix(core): ci fix

fix ci errors

* refactor(schema): rename schema type FooCreate to CreateFoo

rename schema type from FooCreate to CreateFoo

* fix(schema): add guard nullable

add guard nullable gen method
2022-01-18 12:44:08 +08:00
simeng-li
d88db54961
feat(core): add resource apis (#180)
* feat(core): add resource apis

add resource apis

* fix(core): resources api CR fix

CR fix of resoruces API

* fix(core): resource api cr fix

remove unnesessary input params destructor
2022-01-18 09:20:49 +08:00
Darcy Ye
dfaf79bc5f
feat(settings): add settings related queries and apis (#174)
* feat(settings): add settings related queries and APIs

* feat: correct setting router type

* chore: hide settingId from response

* chore: reset default settingId for better readability

* chore: fix input params check
2022-01-13 20:05:14 +08:00
simeng-li
f218667ba4
feat(application): add application query exceptions (#172)
* feat(application): add application query exceptions

add application query exceptions

* fix(core): cr fix remove query level exception

remove application query level exception handle logic

* fix(core): delete application query throw slonikError

delete application query throw slonikError
2022-01-13 16:02:28 +08:00
simeng-li
3690265122
feat(applications): add pagination middleware to findAllApplications (#170)
* feat(applications): add pagination middleware to findAllApllications

add pagination middleware to findAllApllications

* fix(core): remove get applications offset check

remove get applications offset check. use db query error

* fix(application): cr fix use buildFindMany

use buildFindMany for paginated find applications query
2022-01-11 08:37:09 +00:00
simeng-li
b9f9847ec0
feat(schema): update application db (#169)
* feat(schema): update appliaction db

update application db

* ci(schema): cr fix application table schema typo

fix application table schema typo
2022-01-11 11:58:58 +08:00
Wang Sijie
1fc73030e8
feat(core): sign in logs (#139)
* fix(core): add log result type

* fix: comments in sql

* feat(core): sign in log

* refactor: insert error log in middleware

* fix: pr fix

* feat: userLog middleware

* refactor: auto capture log

* fix: pr fix

* fix: pr fix
2021-12-08 15:56:57 +08:00
simeng-li
6d5dd55e12
refactor: implement koaUser middleware
* refactor: extract code block of getting detailed user info in koaAuth as middleware koaUser

* refactor: fix according to comments

* refactor: fix methods' and properties' naming
2021-12-02 11:43:04 +08:00
Wang Sijie
3480d05366
refactor(core): encryptUserPassword (#135) 2021-11-18 16:29:24 +08:00
Wang Sijie
7d7b8112f6
refactor(core): use plural in endpoint (#134) 2021-11-18 11:26:51 +08:00
Wang Sijie
9c3b67ae46
feat(core): users basic API (#133) 2021-11-18 11:26:34 +08:00
Gao Sun
9aa4caa826
refactor(core): fulfill correct applicationType when needed (#126)
* refactor(core): fulfill correct `applicationType` when needed

* refactor(core): use enum for application type

* refactor(core): do not filter undefined automatically
2021-10-11 09:55:17 +00:00
simeng-li
4ea5f65982
fix(core): add redirectURI to the response body of register endpoint /user (#119)
* fix(ui): hide loading status

should hide loading status while a http error is thrown

* fix(ui): use api-hooks for consent request

integrate api-hooks for the consent page request

* fix(ui): add redirectURI to the response body of register endpoint

Fix the use registration flow, should redirect after a success registration callback
2021-09-24 17:00:26 +08:00
Gao Sun
7c69896126
refactor: @logto/essentials -> @silverhand/essentials (#118)
* refactor: `@logto/essentials` -> `@silverhand/essentials`

* chore: remove useless comment
2021-09-16 23:48:06 +08:00
Gao Sun
8e291b51bf
test(core): add unit tests for generateUserId() (#113) 2021-09-08 10:29:14 +08:00
Gao Sun
7ae7912642
refactor: adopt new ESLint rule set for FP (#111) 2021-09-07 20:24:27 +08:00
Gao Sun
af942d2027
feat(core): add status api and health check after deployment (#110) 2021-09-06 10:40:06 +08:00
Gao Sun
ed204f91c5
feat(core): GET /applications (#107) 2021-09-01 20:51:34 +08:00
Gao Sun
5d5d43deee
feat(core): GET /application/:id (#106) 2021-09-01 18:23:53 +08:00
Gao Sun
7c6602a1ac
refactor(core): fixing router types 2021-09-01 17:35:23 +08:00
Gao Sun
806e99de61
refactor: replace plain assert with a more strict version (#103) 2021-08-31 22:45:28 +08:00
Gao Sun
ea4cfd0e59
chore: update eslint config (#98) 2021-08-30 11:30:54 +08:00
Gao Sun
625520d75a
refactor: throw an error when requesting invalid scope (#94) 2021-08-28 10:50:38 +08:00
Gao Sun
6b6210feee
feat: PATCH /application/:id 2021-08-27 17:07:15 +08:00
Gao Sun
334cc5903a
refactor: accept rest data while creating application 2021-08-27 17:07:11 +08:00
Gao Sun
af11f18e40
feat: DELETE /application/:id 2021-08-25 23:42:03 +08:00
Gao Sun
b192b7d17c
feat: POST /applicaiton 2021-08-18 00:24:00 +08:00
Gao Sun
acd8157a0d
feat: validate access token if needed 2021-08-15 23:39:03 +08:00
Gao Sun
bb7c8184f7
feat: init application api 2021-08-14 21:39:37 +08:00
Gao Sun
96bf7cee77
refactor(core): re-org files 2021-08-12 19:39:28 +08:00
Gao Sun
b457d95a9e refactor: conform RESTful convention (#77)
* refactor: conform RESTful convention

* refactor: update tests
2021-08-11 22:13:08 +08:00
Gao Sun
e5d49504ac
refactor(core): align next() usage and add prod mode for ui proxy 2021-07-30 02:21:47 +08:00
Gao Sun
590dd7d858
feat(phrases): add package and refactor error code 2021-07-28 01:13:51 +08:00
Gao Sun
94c5115bb0
feat(sign-in): replace id with username 2021-07-26 22:32:18 +08:00
Gao Sun
f422c3ae3f
refactor: refine sign-in errors 2021-07-25 17:39:59 +08:00
Gao Sun
6031b8a683
feat: auto-gen api doc 2021-07-25 17:39:59 +08:00
Gao Sun
0ee771bc33
fix: revert incorrect comments 2021-07-25 17:39:58 +08:00
Gao Sun
a7ab69ecd5
refactor: re-org RequestError files 2021-07-25 17:39:58 +08:00
Gao Sun
0356010ee3
feat: add /sign-in/abort api, close #32 2021-07-25 17:39:58 +08:00
Gao Sun
ae6e196f37
refactor: add guard and error handler middleware 2021-07-25 17:39:58 +08:00
Gao Sun
916130b5fc
api: register with username / password 2021-07-25 17:39:57 +08:00
Gao Sun
928a631bcc
api: add sign in / consent 2021-07-25 17:39:57 +08:00
Gao Sun
f419a91c5d
feat: sign in API via user id + password 2021-07-25 17:39:57 +08:00