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:
commit
93294aed95
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
// 处理错误
|
||||
|
|
Loading…
Reference in a new issue