-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Expand file tree
/
Copy pathpage.json
More file actions
1 lines (1 loc) · 3.34 KB
/
Copy pathpage.json
File metadata and controls
1 lines (1 loc) · 3.34 KB
1
{"slug":"/references/auth/events","title":"Auth Module Events Reference","frontmatter":{"slug":"/references/auth/events","sidebar_label":"Events Reference","generate_toc":true},"toc":[],"blocks":[{"kind":"markdown","html":"This reference shows all the events emitted by the Medusa application related to the Auth Module. If you use the module outside the Medusa application, these events aren't emitted."},{"kind":"eventsListing","categories":[{"title":"Auth","events":[{"name":"auth.mfa_enabled","id":"authmfa_enabled","description":"Emitted when an MFA factor is enabled for an auth identity.","payload":"```ts\n{\n auth_identity_id, // The ID of the auth identity for which the MFA factor was enabled.\n mfa_id, // The ID of the MFA factor that was enabled.\n provider, // The provider of the MFA factor that was enabled.\n}\n```","since":"2.15.5"},{"name":"auth.mfa_disabled","id":"authmfa_disabled","description":"Emitted when an MFA factor is disabled for an auth identity.","payload":"```ts\n{\n auth_identity_id, // The ID of the auth identity for which the MFA factor was disabled.\n mfa_id, // The ID of the MFA factor that was disabled.\n provider, // The provider of the MFA factor that was disabled.\n}\n```","since":"2.15.5"},{"name":"auth.mfa_recovery_codes_generated","id":"authmfa_recovery_codes_generated","description":"Emitted when recovery codes are generated for an auth identity.","payload":"```ts\n{\n auth_identity_id, // The ID of the auth identity for which the recovery codes were generated.\n count, // (number) The number of recovery codes that were generated.\n}\n```","since":"2.15.5"},{"name":"auth.password_reset","id":"authpassword_reset","description":"Emitted when a reset password token is generated. You can listen to this event\nto send a reset password email to the user or customer, for example.","payload":"```ts\n{\n entity_id, // The identifier of the user or customer. For example, an email address.\n actor_type, // The type of actor. For example, \"customer\", \"user\", or custom.\n token, // The generated token.\n metadata, // Optional custom metadata passed from the request.\n}\n```","workflows":[{"name":"generateResetPasswordTokenWorkflow","href":"/references/medusa-workflows/generateResetPasswordTokenWorkflow"}]},{"name":"auth.verification_requested","id":"authverification_requested","description":"Emitted when a verification code is generated. You can listen to\nthis event and decide how to deliver the code to the user or customer.\nThe payload changed in v2.17.0:\n`actor_type` and `provider_identity_id` were removed,\n`provider` was renamed to `code_provider`, and `entity_type` was added.\nSubscribers written before v2.17.0 must be updated to use the payload below.","payload":"```ts\n{\n entity_id, // The identifier of the entity being verified. For example, an email address.\n entity_type, // The kind of entity being verified. For example, \"email\".\n code_provider, // The verification provider that generated the code. For example, \"token\".\n auth_identity_id, // The ID of the auth identity being verified.\n code, // The generated verification code.\n expires_at, // (Date) The code expiry date.\n metadata, // (object) Optional custom metadata passed from the request.\n}\n```","workflows":[{"name":"requestVerificationWorkflow","href":"/references/medusa-workflows/requestVerificationWorkflow"}],"since":"2.15.5"}]}]}]}