AngularFire Firebase email/password authentication gives "Error: This custom Firebase server ('firebaseapp.com') does not support delegated login."
AngularFire Firebase email/password authentication gives "Error: This custom Firebase server ('firebaseapp.com') does not support delegated login."
我正在尝试通过 email/password 功能获取 AngularFire 用户身份验证,但出现错误。
从 $authWithPassword 调用返回的错误是:
错误:此自定义 Firebase 服务器 ('firebaseapp.com') 不支持委托登录。
您可以在下面的 plunker 的控制台日志中查看此消息。我找不到任何文档说明需要任何额外的设置来支持委托登录,或者我会怎么做。
plunker 的控制台日志还将显示对 firebase 应用 URL 的定期 Web 请求,该请求导致 404。一旦调用 $firebaseAuth(ref) ,这些就会开始发生。这些回复的内容是一个 HTML 页面,标题为:未找到网站。
我有一个演示用户 'demo@zerrtech.com',密码 'demo' 和 sample plunker set up here。这是代码:
angular.module('authdemo', ['firebase'])
.controller('authCtrl', function($scope, $log, $firebaseAuth) {
var ref = new Firebase('https://zerrtech-sandbox.firebaseapp.com');
var auth = $firebaseAuth(ref);
auth.$authWithPassword({
email: 'demo@zerrtech.com',
password: 'demo'
}).then(function(authData) {
$log.info("Login Successful:");
$log.info(authData);
}).catch(function(error) {
$log.info("Login Failed:");
$log.info(error);
});
});
这是一个非常基本的用例,代码直接来自示例,所以我错过了什么?
您正在使用错误的 url 实例化您的 Firebase 对象。 Firebase 数据库位于 firebaseio.com
。 Firebase 托管站点位于 firebaseapp.com
.
我正在尝试通过 email/password 功能获取 AngularFire 用户身份验证,但出现错误。
从 $authWithPassword 调用返回的错误是:
错误:此自定义 Firebase 服务器 ('firebaseapp.com') 不支持委托登录。
您可以在下面的 plunker 的控制台日志中查看此消息。我找不到任何文档说明需要任何额外的设置来支持委托登录,或者我会怎么做。
plunker 的控制台日志还将显示对 firebase 应用 URL 的定期 Web 请求,该请求导致 404。一旦调用 $firebaseAuth(ref) ,这些就会开始发生。这些回复的内容是一个 HTML 页面,标题为:未找到网站。
我有一个演示用户 'demo@zerrtech.com',密码 'demo' 和 sample plunker set up here。这是代码:
angular.module('authdemo', ['firebase'])
.controller('authCtrl', function($scope, $log, $firebaseAuth) {
var ref = new Firebase('https://zerrtech-sandbox.firebaseapp.com');
var auth = $firebaseAuth(ref);
auth.$authWithPassword({
email: 'demo@zerrtech.com',
password: 'demo'
}).then(function(authData) {
$log.info("Login Successful:");
$log.info(authData);
}).catch(function(error) {
$log.info("Login Failed:");
$log.info(error);
});
});
这是一个非常基本的用例,代码直接来自示例,所以我错过了什么?
您正在使用错误的 url 实例化您的 Firebase 对象。 Firebase 数据库位于 firebaseio.com
。 Firebase 托管站点位于 firebaseapp.com
.