We are experiencing random user disconnection

We’re experiencing some random disconnections in the process for Exchange of Refresh Token for Access Token.

This is the error that we found in the log:

  "date": "2022-04-05T10:17:01.087Z",
  "type": "fertft",
  "description": "Cannot read property 'scope' of undefined",
  "connection_id": "",
  "client_id": "XXXXXXXXXXXXXXXX",
  "client_name": "App",
  "ip": "xxx.xxx.xxx.xxx",
  "user_agent": "Company 4515.0.0 / Other 0.0.0",
  "hostname": "xxxxx.eu.auth0.com",
  "user_id": "",
  "user_name": "",
  "auth0_client": {
    "name": "react-native-auth0",
    "version": "2.1.0"
  },
  "log_id": "XXXXXXXXXX",
  "_id": "XXXXXXXXXXXX",
  "isMobile": false
}```

Any ideas?

Hi @miguel.hernandez ,

Welcome to the Auth0 Community!

I checked your tenant and noticed in the rule “Basic Scope Verification”,

const requestedScopes = context.request.body.scope || context.request.query.scope || '';

Do you want to try updating it as below and check the log again?

var requestedScopes = context.request.body.scope || (context.request.query && context.request.query.scope) || null;

2 Likes