Auth0 Home Blog Docs

redirectUrl mismatch using WebAuth

Hello,

We are testing the auth0 flow on a react application and there is an error when I select github as an auth method, from the logs:

{
  "date": "2019-02-14T19:46:52.383Z",
  "type": "f",
  "description": "You may have pressed the back button, refreshed during login, opened too many login dialogs, or there is some issue with cookies, since we couldn't find your session. Try logging in again from the application and if the problem persists please contact the administrator.",
  "connection_id": "",
  "ip": "24.48.72.138",
  "user_agent": "Chrome 71.0.3578 / Mac OS X 10.14.1",
  "details": {
    "body": {},
    "qs": {
      "error": "redirect_uri_mismatch",
      "error_description": "The redirect_uri MUST match the registered callback URL for this application.",
      "error_uri": "https://developer.github.com/apps/managing-oauth-apps/troubleshooting-authorization-request-errors/#redirect-uri-mismatch",
      "state": "FVyEHNzO7jZZ9V7BmoMKHOrD8H52meOZ"
    },
    "error": {
      "message": "You may have pressed the back button, refreshed during login, opened too many login dialogs, or there is some issue with cookies, since we couldn't find your session. Try logging in again from the application and if the problem persists please contact the administrator.",
      "oauthError": "invalid_request",
      "type": "request-error"
    },
    "session_id": "dW3EE7lr8ACmuCvlpy9uvl_gX2GYU-St"
  },
  "hostname": "xxxxx.auth0.com",
  "log_id": "90020190214194652383620345676495929658765963352155244702",
  "isMobile": false
}

The redirect URL seems to be the same in both the javascript and the application settingsā€¦

Update:

I found out that the redirectUrl from github was auth.domainName.io/callback instead of localhost:3000/callback. I changed the domain parameter to localhost:3000 but now it says the connection is not secure (SSL).