angularjs-in-action / angello

MIT License
247 stars 136 forks source link

CORS & auth0 #31

Open RaphaelBossek opened 9 years ago

RaphaelBossek commented 9 years ago

I got the following message with Chrome version 40.0.2214.94 (64-bit):

Client configuration loaded
bean.js:199 'KeyboardEvent.keyLocation' is deprecated. Please use 'KeyboardEvent.location' instead.
3c2aa1b7d4a13b7f6759a5ef9b17a5f7:1 GET https://www.gravatar.com/avatar/3c2aa1b7d4a13b7f6759a5ef9b17a5f7?d=404 404 (Not Found)
reqwest.js:226 POST https://angello.auth0.com/dbconnections/signup reqwest.js:226 getRequestreqwest.js:365 initreqwest.js:235 Reqwestreqwest.js:429 reqwestindex.js:380 Auth0.signupindex.js:250 SignupPanel.submitindex.js:189 SignupPanel.onsubmitindex.js:12 bindedbean.js:254 callbean.js:269 handlerbean.js:434 rootListener
(index):1 XMLHttpRequest cannot load https://angello.auth0.com/dbconnections/signup. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8081' is therefore not allowed access. The response had HTTP status code 400.
angular.js:11413 There's an error logging in Error: Unknown error.
    at LoginError.Error (native)
    at new LoginError (http://cdn.auth0.com/js/lock-6.js:5710:19)
    at fail (http://cdn.auth0.com/js/lock-6.js:6156:17)
    at Object.Auth0.signup.reqwest.error (http://cdn.auth0.com/js/lock-6.js:6185:7)
    at http://cdn.auth0.com/js/lock-6.js:8885:20
    at error (http://cdn.auth0.com/js/lock-6.js:8963:36)
    at XMLHttpRequest.headers (http://cdn.auth0.com/js/lock-6.js:8691:11)angular.js:11413 (anonymous function)LoginController.js:11 (anonymous function)auth0-angular-4.js:360 $get.auth.signin.errorFnauth0-angular-4.js:53 $get.authUtils.callbackify.callbackauth0-angular-4.js:101 (anonymous function)angular.js:14204 $get.k.$evalangular.js:14302 $get.k.$applyauth0-angular-4.js:44 $get.authUtils.safeApplyauth0-angular-4.js:100 $get.authUtils.appliedindex.js:276 (anonymous function)index.js:364 failindex.js:388 Auth0.signup.reqwest.errorreqwest.js:282 (anonymous function)reqwest.js:360 errorreqwest.js:88 headers
extensions::messaging:70 Uncaught Error: Attempting to use a disconnected port object

I'm using superstatic with nodejs and following configuration superstatic.json:

{
  "headers": {
    "/**": {
      "Access-Control-Allow-Origin": "*",
      "Access-Control-Allow-Methods": "GET,POST,OPTIONS,HEAD",
      "Access-Control-Allow-Credentials": "true"
    }
  },
  "redirects": {
    "/": {
      "status": 302,
      "url": "/client"
    }
  }
}