Unable to login using auth0 in a asp.net core 6 application

I have integrated a asp.net MVC core 6 application with auth0. it was working fine and now it has stopped working. At login it fails with following error: “Request failed with status code 404”

Log Details RAW:

{
“date”: “2023-02-08T17:11:42.819Z”,
“type”: “f”,
“description”: “Request failed with status code 404”,
“connection”: “Username-Password-Authentication”,
“connection_id”: “con_jGli5Ve7NXbZ0Xyy”,
“client_id”: “Npu6vrDphFRmA6HxgM7pxrXlkyVnvI7A”,
“client_name”: “Acme”,
“ip”: “47.151.178.250”,
“user_agent”: “Chrome 109.0.0 / Windows 10.0.0”,
“details”: {
“body”: {},
“qs”: {
“state”: “bI1VGAApdeb1fJSoHqKMAtheL37iCIYi”
},
“connection”: “Username-Password-Authentication”,
“error”: {
“message”: “Request failed with status code 404”,
“oauthError”: “access_denied”,
“type”: “oauth-authorization”
},
“session_id”: “U0M2yyEH8PUrelmsxodqrouN-Mv59-5J”,
“actions”: {
“executions”: [
“UDtAnfJYTxWcpAqrglVTAjIwMjMwMjA4”
]
},
“stats”: {
“loginsCount”: 9
}
},
“hostname”: “dev-8ndc0hi6.us.auth0.com”,
“user_id”: “auth0|63e1997f9ef40b4f1432967b”,
“user_name”: “neelatrey@outlook.com”,
“strategy”: “auth0”,
“strategy_type”: “database”,
“audience”: “https://redemption-api.com”,
“scope”: [
“openid”,
“profile”,
“email”,
“offline_access”
],
“log_id”: “90020230208171147872690867546683077298793466058336370690”,
“_id”: “90020230208171147872690867546683077298793466058336370690”,
“isMobile”: false,
“id”: “90020230208171147872690867546683077298793466058336370690”
}

Log Details Context Data

{
“body”: {},
“qs”: {
“state”: “bI1VGAApdeb1fJSoHqKMAtheL37iCIYi”
},
“connection”: “Username-Password-Authentication”,
“error”: {
“message”: “Request failed with status code 404”,
“oauthError”: “access_denied”,
“type”: “oauth-authorization”
},
“session_id”: “U0M2yyEH8PUrelmsxodqrouN-Mv59-5J”,
“actions”: {
“executions”: [
“UDtAnfJYTxWcpAqrglVTAjIwMjMwMjA4”
]
},
“stats”: {
“loginsCount”: 9
}
}

Action Details

{
  "action_name": "EmailVerified",
  "response": {
    "error": {
      "message": "Request failed with status code 404",
      "name": "Error",
      "stack": "Error: Request failed with status code 404\n    at createError (/data/_verquire/_node16/axios/0.22.0/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/data/_verquire/_node16/axios/0.22.0/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/data/_verquire/_node16/axios/0.22.0/node_modules/axios/lib/adapters/http.js:293:11)\n    at IncomingMessage.emit (node:events:539:35)\n    at IncomingMessage.emit (node:domain:537:15)\n    at endReadableNT (node:internal/streams/readable:1345:12)\n    at processTicksAndRejections (node:internal/process/task_queues:83:21)"
    },
    "stats": {
      "total_request_duration_ms": 279,
      "total_runtime_execution_duration_ms": 274,
      "runtime_processing_duration_ms": 4,
      "action_duration_ms": 270,
      "boot_duration_ms": 4,
      "network_duration_ms": 5
    }
  },
  "error": {
    "id": "invalid_argument",
    "msg": "Invalid Argument"
  },
  "started_at": "2023-02-08T17:11:42.528953618Z",
  "ended_at": "2023-02-08T17:11:42.808308529Z"
}

Hi @neel :wave:

I can see the error is being raised from your EmailVerified action. It looks as though you are making a call to an external endpoint with axios which is returning a 404.

I would recommend double checking the endpoint you are hitting to make sure it can handle the request triggered in this action.

Let me know how you get on!

1 Like

James, Thank you so much! this led to find the solution. I do have one question though, is there a way for me to see the same debug information so that I do not have to go to community again?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.