mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
fix(console): use correct vanillajs isAuthenticated method in guide (#3947)
fix(console): correct code sample in vanilla-js guide
This commit is contained in:
parent
0e8817f279
commit
fb2bb527aa
2 changed files with 2 additions and 2 deletions
|
@ -105,7 +105,7 @@ Insert the code below in your `/callback` route:
|
|||
```ts
|
||||
try {
|
||||
await logtoClient.handleSignInCallback(window.location.href);
|
||||
console.log(logtoClient.isAuthenticated); // true
|
||||
console.log(await logtoClient.isAuthenticated()); // true
|
||||
} catch {
|
||||
// Handle error
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ const logtoClient = new LogtoClient({
|
|||
```ts
|
||||
try {
|
||||
await logtoClient.handleSignInCallback(window.location.href);
|
||||
console.log(logtoClient.isAuthenticated); // true
|
||||
console.log(await logtoClient.isAuthenticated()); // true
|
||||
} catch {
|
||||
// 处理错误
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue