Cross Origin error in Firebase authentication

折月煮酒 提交于 2019-12-12 14:33:56

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!