diff --git a/www/apps/resources/generated/edit-dates.mjs b/www/apps/resources/generated/edit-dates.mjs index 235df18b34..34bbb9a30c 100644 --- a/www/apps/resources/generated/edit-dates.mjs +++ b/www/apps/resources/generated/edit-dates.mjs @@ -838,7 +838,7 @@ export const generatedEditDates = { "references/auth/IAuthModuleService/methods/auth.IAuthModuleService.authenticate/page.mdx": "2025-01-07T12:54:18.941Z", "references/auth/IAuthModuleService/methods/auth.IAuthModuleService.validateCallback/page.mdx": "2025-01-07T12:54:18.948Z", "references/auth/interfaces/auth.AuthenticationResponse/page.mdx": "2024-12-09T13:21:36.233Z", - "references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx": "2025-05-20T07:51:40.736Z", + "references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx": "2025-10-15T15:45:41.565Z", "references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.refreshInviteTokensWorkflow/page.mdx": "2025-09-18T17:04:39.919Z", "references/types/CommonTypes/types/types.CommonTypes.BatchMethodResponse/page.mdx": "2024-12-09T13:21:32.849Z", "references/types/HttpTypes/interfaces/types.HttpTypes.AdminAddReturnShipping/page.mdx": "2025-04-11T09:04:47.540Z", diff --git a/www/apps/resources/references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx b/www/apps/resources/references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx index da39441262..759b288c44 100644 --- a/www/apps/resources/references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx +++ b/www/apps/resources/references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx @@ -532,16 +532,18 @@ module.exports = defineConfig({ To test out your Authentication Module Provider, use any of the [Authentication Routes](https://docs.medusajs.com/resources/commerce-modules/auth/authentication-route), using your provider's ID as a path parameter. -For example, to get a registration token for an admin user, send a `POST` request to `/auth/user/my-auth/register` replacing `my-auth` with your Authentication Module Provider's ID: +For example, to get a registration token for a customer, send a `POST` request to `/auth/customer/my-auth/register` replacing `my-auth` with your Authentication Module Provider's ID: ```bash -curl -X POST http://localhost:9000/auth/user/my-auth/register +curl -X POST http://localhost:9000/auth/customer/my-auth/register -H 'Content-Type: application/json' --data-raw '{ "email": "Whitney_Schultz@gmail.com", "password": "supersecret" }' ``` -Change the request body to pass the data required for your Authentication Module Provider to register the user. +Change the request body to pass the data required for your Authentication Module Provider to register the customer. If registration is successful, the response will have a `token` property. + +You can then use the token to create a customer by sending a request to the [Create Customer API route](https://docs.medusajs.com/api/store#customers_postcustomers). diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/auth-provider.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/auth-provider.ts index bf7940cb4e..79a7685ddc 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/auth-provider.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-custom-options/auth-provider.ts @@ -121,10 +121,10 @@ module.exports = defineConfig({ To test out your Authentication Module Provider, use any of the [Authentication Routes](https://docs.medusajs.com/resources/commerce-modules/auth/authentication-route), using your provider's ID as a path parameter. -For example, to get a registration token for an admin user, send a \`POST\` request to \`/auth/user/my-auth/register\` replacing \`my-auth\` with your Authentication Module Provider's ID: +For example, to get a registration token for a customer, send a \`POST\` request to \`/auth/customer/my-auth/register\` replacing \`my-auth\` with your Authentication Module Provider's ID: \`\`\`bash -curl -X POST http://localhost:9000/auth/user/my-auth/register +curl -X POST http://localhost:9000/auth/customer/my-auth/register -H 'Content-Type: application/json' \ --data-raw '{ "email": "Whitney_Schultz@gmail.com", @@ -132,9 +132,11 @@ curl -X POST http://localhost:9000/auth/user/my-auth/register }' \`\`\` -Change the request body to pass the data required for your Authentication Module Provider to register the user. +Change the request body to pass the data required for your Authentication Module Provider to register the customer. If registration is successful, the response will have a \`token\` property. + +You can then use the token to create a customer by sending a request to the [Create Customer API route](https://docs.medusajs.com/api/store#customers_postcustomers). `, ], },