mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -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
|
```ts
|
||||||
try {
|
try {
|
||||||
await logtoClient.handleSignInCallback(window.location.href);
|
await logtoClient.handleSignInCallback(window.location.href);
|
||||||
console.log(logtoClient.isAuthenticated); // true
|
console.log(await logtoClient.isAuthenticated()); // true
|
||||||
} catch {
|
} catch {
|
||||||
// Handle error
|
// Handle error
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ const logtoClient = new LogtoClient({
|
||||||
```ts
|
```ts
|
||||||
try {
|
try {
|
||||||
await logtoClient.handleSignInCallback(window.location.href);
|
await logtoClient.handleSignInCallback(window.location.href);
|
||||||
console.log(logtoClient.isAuthenticated); // true
|
console.log(await logtoClient.isAuthenticated()); // true
|
||||||
} catch {
|
} catch {
|
||||||
// 处理错误
|
// 处理错误
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue