0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

Merge pull request #1461 from logto-io/charles-log-3534-log-3535-fix-vanilla-js-guide

fix(console): vanilla sdk integration guide
This commit is contained in:
Charles Zhao 2022-07-08 00:00:58 +08:00 committed by GitHub
commit 93294aed95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 {
// 处理错误