Closed msmarks closed 3 months ago
Can you post the entire audit log record when await logtoClient.getAccessToken(some resouce)
failed?
At present, I am unable to obtain the call stack, mainly because the users who reported the error are remote mobile users. I will continue to try to reproduce it.
The error 'Load failed' should come from the fetch API in JavaScript. Considering the call to getAccessToken
, if I understand correctly, it will try to apply for a new token through the getAccessTokenByRefreshToken
function when the local access token expires, which includes the fetch
call. If I guess correctly, this error should come from the call to the fetch
function.
I will continue to try to contact technically capable users to provide more detailed information.
I'm sorry, after investigating, I found it is my fault. In order to eliminate the code
in the url, I made location.replace
between steps 4 and 5, which resulted in the cancellation of the fetch
in step 2.
Thanks for support.
Thanks for the detailed update.
Describe the bug
If a user has logged in before but has not accessed for a long time, then the next time they visit, they will enter some loops that cannot be exited.
Maybe related to https://github.com/logto-io/js/issues/732
Expected behavior
How to reproduce?
environment Client: "@ logto/browser": "^ 2.2.16" Server: Docker image svhd/logo: 1.17.0
I personally find it difficult to reproduce this issue, but based on the reports from my users, they have all logged in before but have not visit my website for a long time. From the logs, they all have the following loop.
The loop is:
await logtoClient.isAuthenticated()
, it returnstrue
.await logtoClient.getAccessToken(some resouce)
, it throw error, theerror.message
isLoad failed
.await logtoClient.signIn(some callbackURL)
, it redirect without showing any inputbox, immediately redirect back withcode
param.await logtoClient.handleSignInCallback(window.location.href)
and success.I have tried adjusting the system date and other methods myself, but I am unable to reproduce this issue. I will continue to follow up.
Or is there any way to break out of this loop?
Context
Screenshots