Skip to content

Commit

Permalink
docs: add note about actor_type in reset password event in v2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
shahednasser committed Nov 27, 2024
1 parent 0be25a7 commit c444c15
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ You subscribe to the `auth.password_reset` event. The event has a data payload o
- `token`: The token to reset the user's password.
- `actor_type`: The user's actor type. For example, if the user is a customer, the `actor_type` is `customer`. If it's an admin user, the `actor_type` is `user`.

<Note>

This event's payload previously had an `actorType` field. It was renamed to `actor_type` after [Medusa v2.0.7](https://github.com/medusajs/medusa/releases/tag/v2.0.7).

</Note>

In the subscriber, you:

- Decide the frontend URL based on whether the user is a customer or admin user by checking the value of `actor_type`.
Expand Down
3 changes: 2 additions & 1 deletion www/apps/resources/app/events-reference/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ This documentation page includes the list of all events emitted by [Medusa's wor

```ts blockStyle="inline"
{
entityId, // The ID of the user
entity_id, // The user's identifier, such as their email
token, // The reset token
actor_type // `user`, `customer`, or custom type
}
```

Expand Down
5 changes: 3 additions & 2 deletions www/apps/resources/generated/edit-dates.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2201,7 +2201,7 @@ export const generatedEditDates = {
"app/admin-components/layouts/single-column/page.mdx": "2024-10-07T11:16:06.435Z",
"app/admin-components/layouts/two-column/page.mdx": "2024-10-07T11:16:10.092Z",
"app/admin-components/components/forms/page.mdx": "2024-10-09T12:48:04.229Z",
"app/commerce-modules/auth/reset-password/page.mdx": "2024-09-25T09:36:26.592Z",
"app/commerce-modules/auth/reset-password/page.mdx": "2024-11-27T13:33:55.940Z",
"app/storefront-development/customers/reset-password/page.mdx": "2024-09-25T10:21:46.647Z",
"app/commerce-modules/api-key/links-to-other-modules/page.mdx": "2024-10-08T08:05:36.596Z",
"app/commerce-modules/cart/extend/page.mdx": "2024-10-08T11:22:22.523Z",
Expand Down Expand Up @@ -3392,5 +3392,6 @@ export const generatedEditDates = {
"references/types/types.InventoryTypes/page.mdx": "2024-11-25T17:49:27.667Z",
"references/types/types.StockLocationTypes/page.mdx": "2024-11-25T17:49:28.127Z",
"references/user/interfaces/user.IMessageAggregator/page.mdx": "2024-11-25T17:49:59.536Z",
"references/utils/utils.PromotionUtils/page.mdx": "2024-11-25T17:49:28.611Z"
"references/utils/utils.PromotionUtils/page.mdx": "2024-11-25T17:49:28.611Z",
"app/events-reference/page.mdx": "2024-11-27T13:31:07.385Z"
}

0 comments on commit c444c15

Please sign in to comment.