diff --git a/packages/console/src/assets/docs/tutorial/integrate-sdk/vanilla.mdx b/packages/console/src/assets/docs/tutorial/integrate-sdk/vanilla.mdx index 87cef3285..b5ceb585c 100644 --- a/packages/console/src/assets/docs/tutorial/integrate-sdk/vanilla.mdx +++ b/packages/console/src/assets/docs/tutorial/integrate-sdk/vanilla.mdx @@ -52,7 +52,7 @@ Import and init `LogtoClient` by passing config: const logtoClient = new LogtoClient({ endpoint: '${props.endpoint}', - clientId: '${props.appId}', + appId: '${props.appId}', });`} @@ -97,7 +97,7 @@ Insert the code below in your `/callback` route: ```ts try { - await logtoClient.handleSignInCallback(); + await logtoClient.handleSignInCallback(window.location.href); console.log(logtoClient.isAuthenticated); // true } catch { // Handle error diff --git a/packages/console/src/assets/docs/tutorial/integrate-sdk/vanilla_zh-cn.mdx b/packages/console/src/assets/docs/tutorial/integrate-sdk/vanilla_zh-cn.mdx index 2e0b669f0..fcd671868 100644 --- a/packages/console/src/assets/docs/tutorial/integrate-sdk/vanilla_zh-cn.mdx +++ b/packages/console/src/assets/docs/tutorial/integrate-sdk/vanilla_zh-cn.mdx @@ -52,7 +52,7 @@ Import 并传入 config 以初始化 `LogtoClient`: const logtoClient = new LogtoClient({ endpoint: '${props.endpoint}', - clientId: '${props.appId}', + appId: '${props.appId}', });`} @@ -97,7 +97,7 @@ const logtoClient = new LogtoClient({ ```ts try { - await logtoClient.handleSignInCallback(); + await logtoClient.handleSignInCallback(window.location.href); console.log(logtoClient.isAuthenticated); // true } catch { // 处理错误