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

refactor(core): move verification record id to header #6801

Closed wangsijie closed 1 week ago

wangsijie commented 1 week ago

Summary

Move verificationRecordId param to header, this is more secury and convenient.

Please notice that newVerificationRecordId is still on request body, because this is not for general use and it is only for a specific new identifier only.

Testing

Integration tests.

Checklist

github-actions[bot] commented 1 week ago

COMPARE TO master

Total Size Diff :chart_with_upwards_trend: +713 Bytes

Diff by File |Name|Diff| |---|---| |packages/core/src/libraries/verification.ts|:chart_with_upwards_trend: +741 Bytes| |packages/core/src/middleware/koa-auth/constants.ts|:chart_with_upwards_trend: +67 Bytes| |packages/core/src/middleware/koa-auth/index.ts|:chart_with_upwards_trend: +32 Bytes| |packages/core/src/middleware/koa-auth/koa-oidc-auth.test.ts|:chart_with_upwards_trend: +215 Bytes| |packages/core/src/middleware/koa-auth/koa-oidc-auth.ts|:chart_with_upwards_trend: +1.45 KB| |packages/core/src/middleware/koa-auth/types.ts|:chart_with_upwards_trend: +120 Bytes| |packages/core/src/routes/init.ts|:chart_with_upwards_trend: +9 Bytes| |packages/core/src/routes/profile/index.openapi.json|:chart_with_upwards_trend: +822 Bytes| |packages/core/src/routes/profile/index.ts|:chart_with_upwards_trend: +389 Bytes| |packages/integration-tests/src/api/profile.ts|:chart_with_upwards_trend: +283 Bytes| |packages/integration-tests/src/tests/api/profile/account-center-reject.test.ts|:chart_with_upwards_trend: +205 Bytes| |packages/integration-tests/src/tests/api/profile/email-and-phone.test.ts|:chart_with_upwards_trend: +60 Bytes| |packages/integration-tests/src/tests/api/profile/index.test.ts|:chart_with_upwards_trend: +80 Bytes| |packages/integration-tests/src/tests/api/profile/social.test.ts|:chart_with_upwards_trend: +129 Bytes|