问题
Some times I get a cross origin error, while logging in using $firebaseAuth
:
var loginObj = $firebaseAuth(firebaseRef);
loginObj.$authWithPassword( {
email: logindata.username,
password: logindata.password
}).then(function (user) {
success(user);
}, function (error) {
failure(error);
});
I am receiving the following error, While login.
https://auth.firebase.com/v2/test-innit-7856/auth/password?&email=test@test.com&password=test&v=js-2.1.0&transport=json&suppress_status_codes=true
Failed to load resource: the server responded with a status of 504 (Gateway Time-out) (index):1 XMLHttpRequest cannot load https://auth.firebase.com/v2/test-innit-7856/auth/password?&email=test@test.com&password=test&v=js-2.1.0&transport=json&suppress_status_codes=true. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://test-innit-7856.firebaseapp.com' is therefore not allowed access. The response had HTTP status code 504
来源:https://stackoverflow.com/questions/29948190/cross-origin-error-in-firebase-authentication