logto-io / logto

🧑‍🚀 The better identity infrastructure for developers and the open-source alternative to Auth0.
https://logto.io
Mozilla Public License 2.0
8.94k stars 446 forks source link

feat(core): apply account center field control #6776

Closed wangsijie closed 1 week ago

wangsijie commented 2 weeks ago

Summary

Apply the account center control for Profile API and every field.

For better code review experience, the file packages/core/src/routes/profile/index.ts is not refactored for exeeding 300 lines, created LOG-10349 to do it later.

Testing

Integration tests.

Checklist

github-actions[bot] commented 2 weeks ago

COMPARE TO master

Total Size Diff :chart_with_upwards_trend: +9.23 KB

Diff by File |Name|Diff| |---|---| |packages/core/src/routes/profile/index.ts|:chart_with_upwards_trend: +1.91 KB| |packages/core/src/routes/profile/middlewares/koa-account-center.ts|:chart_with_upwards_trend: +1.02 KB| |packages/core/src/routes/profile/utils/get-scoped-profile.ts|:chart_with_upwards_trend: +1.22 KB| |packages/core/src/routes/types.ts|:chart_with_upwards_trend: +127 Bytes| |packages/core/src/routes/well-known/well-known.openapi.ts|:chart_with_upwards_trend: +12 Bytes| |packages/integration-tests/src/api/account-center.ts|:chart_with_upwards_trend: +840 Bytes| |packages/integration-tests/src/tests/api/account-center.test.ts|:chart_with_upwards_trend: +96 Bytes| |packages/integration-tests/src/tests/api/profile/account-center-reject.test.ts|:chart_with_upwards_trend: +3.44 KB| |packages/integration-tests/src/tests/api/profile/email-and-phone.test.ts|:chart_with_upwards_trend: +131 Bytes| |packages/integration-tests/src/tests/api/profile/index.test.ts|:chart_with_upwards_trend: +117 Bytes| |packages/integration-tests/src/tests/api/profile/social.test.ts|:chart_with_upwards_trend: +117 Bytes| |packages/phrases/src/locales/en/errors/account-center.ts|:chart_with_upwards_trend: +172 Bytes| |packages/phrases/src/locales/en/errors/index.ts|:chart_with_upwards_trend: +68 Bytes|