logto-io / logto

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

feat(core,schemas): implement social verification experience API endpoints #6150

Closed simeng-li closed 2 days ago

simeng-li commented 6 days ago

Summary

Implement the social verification class and social verification endpoints.

These two endpoints handle the social verification creation and verification logic.

This PR also includes mockSocialConnector updates, and adds the connectorSession write and read logic. So in our integration tests, the connectorSession write and retrieve logic can be tested.

Testing

integration tests added

Checklist

github-actions[bot] commented 6 days ago

COMPARE TO master

Total Size Diff :warning: :chart_with_upwards_trend: +18.8 KB

Diff by File |Name|Diff| |---|---| |packages/connectors/connector-mock-social/src/index.ts|:chart_with_upwards_trend: +781 Bytes| |packages/core/src/routes/experience/classes/experience-interaction.ts|:chart_with_upwards_trend: +96 Bytes| |packages/core/src/routes/experience/classes/verifications/index.ts|:chart_with_upwards_trend: +342 Bytes| |packages/core/src/routes/experience/classes/verifications/social-verification.ts|:chart_with_upwards_trend: +5.91 KB| |packages/core/src/routes/experience/index.ts|:chart_with_upwards_trend: +315 Bytes| |packages/core/src/routes/experience/verification-routes/social-verification.ts|:chart_with_upwards_trend: +2.93 KB| |packages/core/src/routes/interaction/types/index.ts|:chart_with_upwards_trend: +134 Bytes| |packages/integration-tests/src/client/experience/index.ts|:chart_with_upwards_trend: +803 Bytes| |packages/integration-tests/src/helpers/experience/social-verification.ts|:chart_with_upwards_trend: +938 Bytes| |packages/integration-tests/src/tests/api/experience-api/verifications/social-verification.test.ts|:chart_with_upwards_trend: +5.74 KB| |packages/schemas/src/types/interactions.ts|:chart_with_upwards_trend: +912 Bytes|