logto-io / js

🤓 Logto JS SDKs.
https://docs.logto.io/quick-starts/
MIT License
70 stars 42 forks source link

bug: isAuthenticated is always true even when session is expired #835

Open Hanmo123 opened 1 month ago

Hanmo123 commented 1 month ago

Describe the bug

I am using @logto/vue and my session is expired(the response of logto is 400), but the return value of logto.isAuthenticated is still true

Expected behavior

It should be false.

How to reproduce?

Just wait for session to be expired.

Context

Screenshots

image

wangsijie commented 1 month ago

isAuthenticated is true if a sign-in state exists locally. For accurate results, communicate with the remote server (Logto) by calling getAccessToken or fetching the user information.

Hanmo123 commented 1 month ago

It's a little counterintuitive, maybe it can be improved.