Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): trigger user create DataHook event on user registration #5837

Conversation

simeng-li
Copy link
Contributor

@simeng-li simeng-li commented May 9, 2024

Summary

trigger user create DataHook event on user registration.

This PR includes the following updates:

  • Add the DataHookContext to the interactionApiMetadata
  • Append User.Created Datahook event on all Register interaction code.
  • Append User.Updated Datahook event on all use profile update and reset password interaction code.
  • Refactor the integration tests of triggering hooks.

Testing

integration tests

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

Copy link

github-actions bot commented May 9, 2024

COMPARE TO master

Total Size Diff 📈 +3.82 KB

Diff by File
Name Diff
packages/core/src/libraries/hook/context-manager.ts 📈 +7 Bytes
packages/core/src/routes/interaction/actions/helpers.ts 📈 +275 Bytes
packages/core/src/routes/interaction/actions/submit-interaction.mfa.test.ts 📈 +38 Bytes
packages/core/src/routes/interaction/actions/submit-interaction.test.ts 📈 +1.69 KB
packages/core/src/routes/interaction/actions/submit-interaction.ts 📈 +437 Bytes
packages/core/src/routes/interaction/middleware/koa-interaction-hooks.ts 📈 +1.2 KB
packages/core/src/routes/interaction/single-sign-on.ts 📈 +153 Bytes
packages/core/src/routes/interaction/utils/single-sign-on.test.ts 📈 +73 Bytes
packages/core/src/routes/interaction/utils/single-sign-on.ts 📈 +20 Bytes
packages/integration-tests/src/helpers/connector.ts 📈 +193 Bytes
packages/integration-tests/src/helpers/hook.ts 📈 +744 Bytes
packages/integration-tests/src/helpers/interactions.ts 📈 +914 Bytes
packages/integration-tests/src/tests/api/hook/WebhookMockServer.ts 📈 +807 Bytes
packages/integration-tests/src/tests/api/hook/hook.trigger.data.test.ts 📈 +199 Bytes
packages/integration-tests/src/tests/api/hook/hook.trigger.interaction.test.ts 📈 +960 Bytes
packages/integration-tests/src/tests/api/interaction/sign-in-with-password-identifier/happy-path.test.ts 📈 +3.62 KB

@github-actions github-actions bot added feature Cool stuff size/s labels May 9, 2024
@simeng-li simeng-li force-pushed the simeng-log-8836-user-account-interaction-webhooks-support-datahook branch from 1e23dc1 to b0f1286 Compare May 10, 2024 03:56
@simeng-li simeng-li requested review from a team, wangsijie and charIeszhao and removed request for a team May 13, 2024 03:54
@simeng-li simeng-li marked this pull request as ready for review May 13, 2024 03:54
@simeng-li simeng-li requested a review from gao-sun as a code owner May 13, 2024 03:54
@simeng-li simeng-li force-pushed the simeng-log-8837-update-interaction-webhook-middleware-to-support-datahook branch from 7862d14 to 774f1ae Compare May 13, 2024 07:02
@simeng-li simeng-li force-pushed the simeng-log-8836-user-account-interaction-webhooks-support-datahook branch from 0b5e405 to 1ca3511 Compare May 13, 2024 07:02
@simeng-li simeng-li force-pushed the simeng-log-8837-update-interaction-webhook-middleware-to-support-datahook branch from 774f1ae to d4db37d Compare May 13, 2024 07:22
@simeng-li simeng-li force-pushed the simeng-log-8836-user-account-interaction-webhooks-support-datahook branch from 1ca3511 to f8c4b07 Compare May 13, 2024 07:24
@simeng-li simeng-li force-pushed the simeng-log-8837-update-interaction-webhook-middleware-to-support-datahook branch from d4db37d to 0e4d5c7 Compare May 13, 2024 08:13
@simeng-li simeng-li force-pushed the simeng-log-8836-user-account-interaction-webhooks-support-datahook branch from f8c4b07 to 17f0a4e Compare May 13, 2024 08:14
Base automatically changed from simeng-log-8837-update-interaction-webhook-middleware-to-support-datahook to master May 13, 2024 08:49
@simeng-li simeng-li force-pushed the simeng-log-8836-user-account-interaction-webhooks-support-datahook branch from 17f0a4e to a9e588a Compare May 13, 2024 10:40
trigger user data hook event on interaction api call
fix the interactionHookMiddleware
add integration tests for interaction hooks
@simeng-li simeng-li force-pushed the simeng-log-8836-user-account-interaction-webhooks-support-datahook branch from a9e588a to 6a3bc5e Compare May 14, 2024 06:13
@simeng-li simeng-li merged commit 5462ab4 into master May 15, 2024
27 checks passed
@simeng-li simeng-li deleted the simeng-log-8836-user-account-interaction-webhooks-support-datahook branch May 15, 2024 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants