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

docs: add more clarification to reset password in API reference #11695

Merged
merged 1 commit into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions www/apps/api-reference/specs/admin/openapi.full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43546,10 +43546,12 @@ paths:
summary: Generate Reset Password Token for Admin User
x-sidebar-summary: Generate Reset Password Token
description: |
Generate a reset password token for an admin user. This API route emits the `` event, passing it the token as a payload. You can listen to that event and send the user a notification. The notification should have a URL that accepts a `token` query parameter.
Generate a reset password token for an admin user. This API route doesn't reset the admin's password or send them the reset instructions in a notification.

Instead, This API route emits the `auth.password_reset` event, passing it the token as a payload. You can listen to that event in a subscriber as explained in [this guide](https://docs.medusajs.com/resources/commerce-modules/auth/reset-password), then send the user a notification. The notification is sent using a [Notification Module Provider](https://docs.medusajs.com/resources/architectural-modules/notification), and it should have the URL to reset the password in the Medusa Admin dashboard, such as `http://localhost:9000/app/reset-password?token=123`.

Use the generated token to update the user's password using the Reset Password API route.

Use the generated token to update the user's password using the [Reset Password API route](https://docs.medusajs.com/api/admin#auth_postactor_typeauth_providerupdate).
externalDocs:
url: https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#generate-reset-password-token-route
description: Learn more about this API route.
Expand Down Expand Up @@ -43602,7 +43604,7 @@ paths:
operationId: PostActor_typeAuth_providerUpdate
summary: Reset an Admin User's Password
x-sidebar-summary: Reset Password
description: Reset a user's password. Generate the reset password token first using the Get Reset Password Token API route.
description: Reset an admin user's password using a reset-password token generated with the [Generate Reset Password Token API route](https://docs.medusajs.com/api/admin#auth_postactor_typeauth_providerresetpassword).
externalDocs:
url: https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#reset-password-route
description: Learn more about this API route.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,23 @@ post:
summary: Generate Reset Password Token for Admin User
x-sidebar-summary: Generate Reset Password Token
description: >
Generate a reset password token for an admin user. This API route emits the
`` event, passing it the token as a payload. You can listen to that event
and send the user a notification. The notification should have a URL that
accepts a `token` query parameter.
Generate a reset password token for an admin user. This API route doesn't
reset the admin's password or send them the reset instructions in a
notification.


Use the generated token to update the user's password using the Reset Password API route.
Instead, This API route emits the `auth.password_reset` event, passing it
the token as a payload. You can listen to that event in a subscriber as
explained in [this
guide](https://docs.medusajs.com/resources/commerce-modules/auth/reset-password),
then send the user a notification. The notification is sent using a
[Notification Module
Provider](https://docs.medusajs.com/resources/architectural-modules/notification),
and it should have the URL to reset the password in the Medusa Admin
dashboard, such as `http://localhost:9000/app/reset-password?token=123`.


Use the generated token to update the user's password using the [Reset Password API route](https://docs.medusajs.com/api/admin#auth_postactor_typeauth_providerupdate).
externalDocs:
url: >-
https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#generate-reset-password-token-route
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ post:
summary: Reset an Admin User's Password
x-sidebar-summary: Reset Password
description: >-
Reset a user's password. Generate the reset password token first using the
Get Reset Password Token API route.
Reset an admin user's password using a reset-password token generated with
the [Generate Reset Password Token API
route](https://docs.medusajs.com/api/admin#auth_postactor_typeauth_providerresetpassword).
externalDocs:
url: >-
https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#reset-password-route
Expand Down
8 changes: 5 additions & 3 deletions www/apps/api-reference/specs/store/openapi.full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,12 @@ paths:
summary: Generate Reset Password Token for Customer
x-sidebar-summary: Generate Reset Password Token
description: |
Generate a reset password token for a customer. This API route emits the `auth.password_reset` event, passing it the token as a payload. You can listen to that event and send the user a notification. The notification should have a URL that accepts a `token` query parameter.
Generate a reset password token for a customer. This API route doesn't reset the customer password or send them the reset instructions in a notification.

Instead, This API route emits the `auth.password_reset` event, passing it the token as a payload. You can listen to that event in a subscriber as explained in [this guide](https://docs.medusajs.com/resources/commerce-modules/auth/reset-password), then send the customer a notification. The notification is sent using a [Notification Module Provider](https://docs.medusajs.com/resources/architectural-modules/notification), and it should have a URL that accepts a `token` query parameter, allowing the customer to reset their password from the storefront.

Use the generated token to update the user's password using the Reset Password API route.

Use the generated token to update the customer's password using the [Reset Password API route](https://docs.medusajs.com/api/store#auth_postactor_typeauth_providerupdate).
externalDocs:
url: https://docs.medusajs.com/v2/resources/storefront-development/customers/reset-password#1-request-reset-password-page
description: 'Storefront development: How to create the request reset password page.'
Expand Down Expand Up @@ -387,7 +389,7 @@ paths:
operationId: PostActor_typeAuth_providerUpdate
summary: Reset a Customer's Password
x-sidebar-summary: Reset Password
description: Reset a customer's password. Generate the reset password token first using the Get Reset Password Token API route.
description: Reset a customer's password using a reset-password token generated with the [Generate Reset Password Token API route](https://docs.medusajs.com/api/store#auth_postactor_typeauth_providerresetpassword).
externalDocs:
url: https://docs.medusajs.com/v2/resources/storefront-development/customers/reset-password#2-reset-password-page
description: 'Storefront development: How to create the reset password page.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@ post:
summary: Generate Reset Password Token for Customer
x-sidebar-summary: Generate Reset Password Token
description: >
Generate a reset password token for a customer. This API route emits the
`auth.password_reset` event, passing it the token as a payload. You can
listen to that event and send the user a notification. The notification
should have a URL that accepts a `token` query parameter.
Generate a reset password token for a customer. This API route doesn't reset
the customer password or send them the reset instructions in a notification.
Use the generated token to update the user's password using the Reset Password API route.
Instead, This API route emits the `auth.password_reset` event, passing it
the token as a payload. You can listen to that event in a subscriber as
explained in [this
guide](https://docs.medusajs.com/resources/commerce-modules/auth/reset-password),
then send the customer a notification. The notification is sent using a
[Notification Module
Provider](https://docs.medusajs.com/resources/architectural-modules/notification),
and it should have a URL that accepts a `token` query parameter, allowing
the customer to reset their password from the storefront.
Use the generated token to update the customer's password using the [Reset Password API route](https://docs.medusajs.com/api/store#auth_postactor_typeauth_providerupdate).
externalDocs:
url: >-
https://docs.medusajs.com/v2/resources/storefront-development/customers/reset-password#1-request-reset-password-page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ post:
summary: Reset a Customer's Password
x-sidebar-summary: Reset Password
description: >-
Reset a customer's password. Generate the reset password token first using
the Get Reset Password Token API route.
Reset a customer's password using a reset-password token generated with the
[Generate Reset Password Token API
route](https://docs.medusajs.com/api/store#auth_postactor_typeauth_providerresetpassword).
externalDocs:
url: >-
https://docs.medusajs.com/v2/resources/storefront-development/customers/reset-password#2-reset-password-page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default async function resetPasswordTokenHandler({

const urlPrefix = actor_type === "customer" ?
"https://storefront.com" :
"https://admin.com"
"https://admin.com/app"

await notificationModuleService.createNotifications({
to: email,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
* summary: Generate Reset Password Token for Admin User
* x-sidebar-summary: Generate Reset Password Token
* description: >
* Generate a reset password token for an admin user. This API route emits the `` event, passing it the token as a payload. You can listen to that event and send the user a notification. The notification should have a URL that accepts a `token` query parameter.
* Generate a reset password token for an admin user. This API route doesn't reset the admin's password or send them the reset instructions in a notification.
*
*
* Use the generated token to update the user's password using the Reset Password API route.
* Instead, This API route emits the `auth.password_reset` event, passing it the token as a payload. You can listen to that event in a subscriber as explained in [this guide](https://docs.medusajs.com/resources/commerce-modules/auth/reset-password), then send the user a notification. The notification is sent using a [Notification Module Provider](https://docs.medusajs.com/resources/architectural-modules/notification), and it should have the URL to reset the password in the Medusa Admin dashboard, such as `http://localhost:9000/app/reset-password?token=123`.
*
*
* Use the generated token to update the user's password using the [Reset Password API route](https://docs.medusajs.com/api/admin#auth_postactor_typeauth_providerupdate).
* externalDocs:
* url: https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#generate-reset-password-token-route
* description: Learn more about this API route.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* operationId: PostActor_typeAuth_providerUpdate
* summary: Reset an Admin User's Password
* x-sidebar-summary: Reset Password
* description: Reset a user's password. Generate the reset password token first using the Get Reset Password Token API route.
* description: Reset an admin user's password using a reset-password token generated with the [Generate Reset Password Token API route](https://docs.medusajs.com/api/admin#auth_postactor_typeauth_providerresetpassword).
* externalDocs:
* url: https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route#reset-password-route
* description: Learn more about this API route.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
* summary: Generate Reset Password Token for Customer
* x-sidebar-summary: Generate Reset Password Token
* description: >
* Generate a reset password token for a customer. This API route emits the `auth.password_reset` event, passing it the token as a payload. You can listen to that event and send the user a notification. The notification should have a URL that accepts a `token` query parameter.
* Generate a reset password token for a customer. This API route doesn't reset the customer password or send them the reset instructions in a notification.
*
*
* Use the generated token to update the user's password using the Reset Password API route.
* Instead, This API route emits the `auth.password_reset` event, passing it the token as a payload. You can listen to that event in a subscriber as explained in [this guide](https://docs.medusajs.com/resources/commerce-modules/auth/reset-password), then send the customer a notification. The notification is sent using a [Notification Module Provider](https://docs.medusajs.com/resources/architectural-modules/notification), and it should have a URL that accepts a `token` query parameter, allowing the customer to reset their password from the storefront.
*
*
* Use the generated token to update the customer's password using the [Reset Password API route](https://docs.medusajs.com/api/store#auth_postactor_typeauth_providerupdate).
* externalDocs:
* url: https://docs.medusajs.com/v2/resources/storefront-development/customers/reset-password#1-request-reset-password-page
* description: "Storefront development: How to create the request reset password page."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* operationId: PostActor_typeAuth_providerUpdate
* summary: Reset a Customer's Password
* x-sidebar-summary: Reset Password
* description: Reset a customer's password. Generate the reset password token first using the Get Reset Password Token API route.
* description: Reset a customer's password using a reset-password token generated with the [Generate Reset Password Token API route](https://docs.medusajs.com/api/store#auth_postactor_typeauth_providerresetpassword).
* externalDocs:
* url: https://docs.medusajs.com/v2/resources/storefront-development/customers/reset-password#2-reset-password-page
* description: "Storefront development: How to create the reset password page."
Expand Down
Loading