Error - The specified redirect_uri 'http://localhost:9527' does not have a registered origin. getTokenWithPopup

Hello.
I am integrated to my SPA “quick start auth0”.
Login/logout is ok.
But me need get roles users. I try get user_metadata.
I try get access_token.
auth0.is.authenticated = true

Click button:

async auth0() {
     this.token = await this.$auth.getTokenSilently()
}

And get error:
invalid_request : The specified redirect_uri ‘http://localhost:9527’ does not have a registered origin.
Log:

{
  "date": "2020-03-07T17:18:52.974Z",
  "type": "fsa",
  "description": "The specified redirect_uri 'http://localhost:9527' does not have a registered origin.",
  "ip": "109.252.28.2",
  "user_agent": "Chrome 80.0.3987 / Windows 10.0.0",
  "details": {
    "body": {},
    "qs": {
      "client_id": "U7f5CTVOjzdqJD4ecfss1yJfXv5N8Tjw",
      "redirect_uri": "http://localhost:9527",
      "scope": "openid profile email",
      "response_type": "code",
      "response_mode": "web_message",
      "state": "QjZJQk4xdzRRQ0Nkbkd2dGtTVEtzdWVfU1paflJCcEZESWlDYmxTSnlZfg==",
      "nonce": "yQSno15GunLCYJJ4si6X2pYjL8.QGhSMsvJdLWBZp7Z",
      "code_challenge": "MxsWz4ZZz9btz0R3Zj1ZK6KugP7uVNP6nYR6e0HV1-0",
      "code_challenge_method": "S256",
      "prompt": "none",
      "auth0Client": "eyJuYW1lIjoiYXV0aDAtc3BhLWpzIiwidmVyc2lvbiI6IjEuNi40In0="
    },
    "connection": null,
    "error": {
      "message": "The specified redirect_uri 'http://localhost:9527' does not have a registered origin.",
      "oauthError": "invalid_request",
      "type": "request-error"
    },
    "session_id": "RoNuWMC8VnCn0jyezvUjtKYziGvpF1W4",
    "session_connection": "Username-Password-Authentication"
  },
  "hostname": "ddolgov.auth0.com",
  "user_id": "auth0|5e5f83fcce9c820d5e1df9ae",
  "user_name": "ddolgov@innowatt.ru",
  "auth0_client": {
    "name": "auth0-spa-js",
    "version": "1.6.4"
  },
  "log_id": "90020200307171854426000047282885836839931959071597396050",
  "_id": "90020200307171854426000047282885836839931959071597396050",
  "isMobile": false
}

What am I doing wrong?

1 Like

I’m an idiot. The error indicates “does not have a registered origin”. Added - ‘Allowed Web Origins’. Everything worked.

1 Like

No worries! Everyone been there, glad you have it figured out!

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