diff --git a/packages/console/src/assets/docs/tutorial/integrate-sdk/express.mdx b/packages/console/src/assets/docs/tutorial/integrate-sdk/express.mdx index 22de23f16..994780944 100644 --- a/packages/console/src/assets/docs/tutorial/integrate-sdk/express.mdx +++ b/packages/console/src/assets/docs/tutorial/integrate-sdk/express.mdx @@ -118,6 +118,7 @@ const { fromUint8Array } = require('js-base64'); const config = { endpoint: '${props.endpoint}', appId: '${props.appId}', + appSecret: '${props.appSecret}', redirectUri: '${props.redirectUris[0] ?? 'http://localhost:3000/callback'}', // Configured in the previous step scopes: withReservedScopes().split(' '), }; diff --git a/packages/console/src/assets/docs/tutorial/integrate-sdk/express_zh-cn.mdx b/packages/console/src/assets/docs/tutorial/integrate-sdk/express_zh-cn.mdx index 3ed6c6b58..fe411bd4f 100644 --- a/packages/console/src/assets/docs/tutorial/integrate-sdk/express_zh-cn.mdx +++ b/packages/console/src/assets/docs/tutorial/integrate-sdk/express_zh-cn.mdx @@ -116,6 +116,7 @@ const { fromUint8Array } = require('js-base64'); const config = { endpoint: '${props.endpoint}', appId: '${props.appId}', + appSecret: '${props.appSecret}', redirectUri: '${props.redirectUris[0] ?? 'http://localhost:3000/callback'}', // 上一步配置过的 Redirect URI scopes: withReservedScopes().split(' '), }; diff --git a/packages/console/src/assets/docs/tutorial/integrate-sdk/next.mdx b/packages/console/src/assets/docs/tutorial/integrate-sdk/next.mdx index 9e057d559..ecc321d3d 100644 --- a/packages/console/src/assets/docs/tutorial/integrate-sdk/next.mdx +++ b/packages/console/src/assets/docs/tutorial/integrate-sdk/next.mdx @@ -59,6 +59,7 @@ import { LogtoProvider, LogtoConfig } from '@logto/next'; export const logtoClient = new LogtoClient({ endpoint: '${props.endpoint}', appId: '${props.appId}', + appSecret: '${props.appSecret}', baseUrl: 'http://localhost:3000', // Change to your own base URL cookieSecret: '${generateRandomString(32)}', // Auto-generated 32 digit secret cookieSecure: process.env.NODE_ENV === 'production', diff --git a/packages/console/src/assets/docs/tutorial/integrate-sdk/next_zh-cn.mdx b/packages/console/src/assets/docs/tutorial/integrate-sdk/next_zh-cn.mdx index 192719fae..8d19266b2 100644 --- a/packages/console/src/assets/docs/tutorial/integrate-sdk/next_zh-cn.mdx +++ b/packages/console/src/assets/docs/tutorial/integrate-sdk/next_zh-cn.mdx @@ -59,6 +59,7 @@ import { LogtoProvider, LogtoConfig } from '@logto/next'; export const logtoClient = new LogtoClient({ endpoint: '${props.endpoint}', appId: '${props.appId}', + appSecret: '${props.appSecret}', baseUrl: 'http://localhost:3000', // 你可以修改为自己真实的 URL cookieSecret: '${generateRandomString(32)}', // Logto 自动帮你生成的 32 位密钥 cookieSecure: process.env.NODE_ENV === 'production', diff --git a/packages/console/src/pages/Applications/components/Guide/index.tsx b/packages/console/src/pages/Applications/components/Guide/index.tsx index 8c64c1529..41ec8cdd1 100644 --- a/packages/console/src/pages/Applications/components/Guide/index.tsx +++ b/packages/console/src/pages/Applications/components/Guide/index.tsx @@ -43,7 +43,7 @@ const Guides: Record JSX.Elemen }; const Guide = ({ app, isCompact, onClose }: Props) => { - const { id: appId, name: appName, type: appType, oidcClientMetadata } = app; + const { id: appId, secret: appSecret, name: appName, type: appType, oidcClientMetadata } = app; const sdks = applicationTypeAndSdkTypeMappings[appType]; const [selectedSdk, setSelectedSdk] = useState(sdks[0]); const [activeStepIndex, setActiveStepIndex] = useState(-1); @@ -92,6 +92,7 @@ const Guide = ({ app, isCompact, onClose }: Props) => { {GuideComponent && (