chore(js-sdk): update TSDocs of auth callback (#11005)

* chore(js-sdk): update TSDocs of auth callback

* generate doc
This commit is contained in:
Shahed Nasser
2025-01-16 20:13:01 +02:00
committed by GitHub
parent 32dd383e9a
commit effee5c8bb
2 changed files with 5 additions and 2 deletions

View File

@@ -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)

View File

@@ -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
<TypeList types={[{"name":"actor","type":"`string`","description":"The actor type. For example, `user` for admin user, or `customer` for customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"method","type":"`string`","description":"The authentication provider to use. For example, `google`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, unknown>`","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"/>
<TypeList types={[{"name":"actor","type":"`string`","description":"The actor type. For example, `user` for admin user, or `customer` for customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"method","type":"`string`","description":"The authentication provider to use. For example, `google`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, unknown>`","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