From effee5c8bb91a8990611e4f5ffeefea55ed64d10 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Thu, 16 Jan 2025 20:13:01 +0200 Subject: [PATCH] chore(js-sdk): update TSDocs of auth callback (#11005) * chore(js-sdk): update TSDocs of auth callback * generate doc --- packages/core/js-sdk/src/auth/index.ts | 4 +++- .../auth/Auth/methods/js_sdk.auth.Auth.callback/page.mdx | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/core/js-sdk/src/auth/index.ts b/packages/core/js-sdk/src/auth/index.ts index 4371d7310a..227d2a4602 100644 --- a/packages/core/js-sdk/src/auth/index.ts +++ b/packages/core/js-sdk/src/auth/index.ts @@ -113,7 +113,8 @@ export class Auth { * * @param actor - The actor type. For example, `user` for admin user, or `customer` for customer. * @param method - The authentication provider to use. For example, `google`. - * @param query - The query parameters from the Oauth callback, which should be passed to the API route. + * @param query - The query parameters from the Oauth callback, which should be passed to the API route. This includes query parameters like + * `code` and `state`. * @returns The authentication JWT token * * @tags auth @@ -124,6 +125,7 @@ export class Auth { * "google", * { * code: "123", + * state: "456" * } * ).then((token) => { * console.log(token) diff --git a/www/apps/resources/references/js_sdk/auth/Auth/methods/js_sdk.auth.Auth.callback/page.mdx b/www/apps/resources/references/js_sdk/auth/Auth/methods/js_sdk.auth.Auth.callback/page.mdx index d4e70ca173..ab724337ec 100644 --- a/www/apps/resources/references/js_sdk/auth/Auth/methods/js_sdk.auth.Auth.callback/page.mdx +++ b/www/apps/resources/references/js_sdk/auth/Auth/methods/js_sdk.auth.Auth.callback/page.mdx @@ -23,6 +23,7 @@ sdk.auth.callback( "google", { code: "123", + state: "456" } ).then((token) => { console.log(token) @@ -31,7 +32,7 @@ sdk.auth.callback( ## Parameters -`","description":"The query parameters from the Oauth callback, which should be passed to the API route.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="callback"/> +`","description":"The query parameters from the Oauth callback, which should be passed to the API route. This includes query parameters like\n`code` and `state`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="callback"/> ## Returns