0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(console): vanilla sdk integration guide

This commit is contained in:
Charles Zhao 2022-07-07 23:21:18 +08:00
parent a0936f3b03
commit 58fe92e914
No known key found for this signature in database
GPG key ID: 4858774754C92DF2
2 changed files with 4 additions and 4 deletions

View file

@ -52,7 +52,7 @@ Import and init `LogtoClient` by passing config:
const logtoClient = new LogtoClient({
endpoint: '${props.endpoint}',
clientId: '${props.appId}',
appId: '${props.appId}',
});`}
</code>
</pre>
@ -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

View file

@ -52,7 +52,7 @@ Import 并传入 config 以初始化 `LogtoClient`
const logtoClient = new LogtoClient({
endpoint: '${props.endpoint}',
clientId: '${props.appId}',
appId: '${props.appId}',
});`}
</code>
</pre>
@ -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 {
// 处理错误