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:
parent
a0936f3b03
commit
58fe92e914
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