Hi,
I use auth0-lock 11.20.2 for my react app SPA. I display lock in a container and has only enabled login with facebook. Regular login is fine, whether it’s silent auth when I’ve already logged in with facebook or first time login when there is no session available. From time to time, I got a Failed Silent Auth error. This happens only if I’ve left the form open for a long time. I redirect user to login form when I’ve found jwt has expired. When I’m redirected to login when jwt has expired, most of the time I’m able to login by clicking the enabled facebook button. But rare times, I’ve experienced the Failed Silent Auth error. The log is something like this:
{
"date": "2020-02-28T23:01:47.973Z",
"type": "fsa",
"description": "Login required",
"client_id": "foo",
"client_name": "chess-tour-ui",
"ip": "64.251.85.134",
"user_agent": "Chrome 80.0.3987 / Windows 10.0.0",
"details": {
"body": {},
"qs": {
"client_id": "foo",
"response_type": "token id_token",
"redirect_uri": "http://localhost:4000/callback",
"scope": "openid profile email",
"audience": "https://api-staging.chesstour.ca",
"connection": "facebook",
"state": "yQyO.q7f4wxnMIiL454BXtGUT8ic9TCX",
"nonce": "G6LAGU3IFMm7LcgGIcmkmkcjfgBTbK9J",
"response_mode": "web_message",
"prompt": "none",
"auth0Client": "eyJuYW1lIjoibG9jay5qcyIsInZlcnNpb24iOiIxMS4yMC4yIiwiZW52Ijp7ImF1dGgwLmpzIjoiOS4xMi4yIn19"
},
"connection": null,
"error": {
"message": "Login required",
"oauthError": "login_required",
"type": "oauth-authorization"
}
},
"hostname": "chess-tour-dev.auth0.com",
"audience": "https://api-staging.chesstour.ca",
"scope": [
"openid",
"profile",
"email"
],
"auth0_client": {
"name": "lock.js",
"version": "11.20.2",
"env": {
"auth0.js": "9.12.2"
}
},
"log_id": "90020200228230149518000964059419034716564949017093472386",
"_id": "90020200228230149518000964059419034716564949017093472386",
"isMobile": false
}
And the summary looks like this:
When this happens, each time I click the facebook login button I got a similar error like this. I check console but there is no relevant logs. All logs (like the same-site one) are the same as when login is successful. The issue is gone once I refresh (F5) the page. Anyone has any ideas?