loginWithRedirect generates query params suggesting auth0 module can't be found

Hi,

I am facing an issue that seems to have come out of nowhere. For reference, I am using the auth 0 spa SDK in a react application.

When loginWithRedirect() is called and redirects the user, the URL it generates includes query params that state: “access denied”, “cannot find module auth0”

Here are the raw query parameters:
error=access_denied&error_description=Cannot%20find%20module%20%27auth0%402.25.1%27&state=VUxvZTdaeE9uTW5BUF9SbEdYWEdPQWZ2TFJCU0JtaVNDYWNwdzNpSFAwTw%3D%3D

This seemingly is not an error in my application code. And I do not see any network calls failing, though I did notice that the call to /authorize is returning a 302 redirect which seems strange (I can’t recall if this is what it always returned).

Any ideas? Is there a way to confirm if this issue is coming from my application? I have already tried deleting all of node_modules and installing fresh packages.

As added context, here is the log event in our tenant’s application:

{
  "date": "2020-05-26T19:04:47.830Z",
  "type": "f",
  "description": "Cannot find module 'auth0@2.25.1'",
  "connection_id": "",
  "client_id": "y3udvjIkL1oIz4WDssC3FAF0cgEw7SRp",
  "client_name": "PD Auth Staging App",
  "ip": "64.94.4.36",
  "user_agent": "Chrome 83.0.4103 / Mac OS X 10.14.6",
  "details": {
    "body": {},
    "qs": {
      "client_id": "<client_ID>",
      "redirect_uri": "http://localhost:8080/calls",
      "scope": "openid profile email offline_access",
      "response_type": "code",
      "response_mode": "query",
      "state": "d1N0SUwuM3puRUtDc3ozR3VRRXFNQUVKMlJLWW9BLjVvWlFTb0VrdlBCMA==",
      "nonce": "clQ2bkZxaXFZajZFY0xKVUFGSVpydHBrYml3Z2hOaXROTGIyVm45ZU1HRw==",
      "code_challenge": "2jgPbbX0IZ_EKXlZ9RTFQX0JFc7ymmVeXchpgC2Xz7w",
      "code_challenge_method": "S256",
      "auth0Client": "eyJuYW1lIjoiYXV0aDAtc3BhLWpzIiwidmVyc2lvbiI6IjEuOC4xIn0="
    },
    "error": {
      "message": "Cannot find module 'auth0@2.25.1'",
      "oauthError": "access_denied",
      "type": "oauth-authorization"
    },
    "session_id": "wtlHCS2db2hnRrlBvsdWbnlaBrla2toi"
  },
  "hostname": "staging-pindrop.auth0.com",
  "user_id": "samlp|staging-okta|jgrim@pindrop.com",
  "user_name": "jgrim@pindrop.com",
  "audience": "https://staging-pindrop.auth0.com/userinfo",
  "scope": [
    "openid",
    "profile",
    "email",
    "offline_access"
  ],
  "auth0_client": {
    "name": "auth0-spa-js",
    "version": "1.8.1"
  },
  "log_id": "90020200526190451507000259912423784945849394065674600498",
  "_id": "90020200526190451507000259912423784945849394065674600498",
  "isMobile": false
}

Discovered the issue. A teammate had turned on a rule that was not working correctly and that is what was generating the error. I found this by looking at the tenant’s logs and noticed all logins since a rule change had failed.

Not sure how to mark this as resolved or closed but we’ve fixed the issue.

Thanks for letting us know and sharing it with the rest of community! Already marked as a solution.