auth/provider-already-linked
User can only be linked to one identity for the given provider.
这是帐户链接代码。匿名用户已登录。
return firebase.auth().createUserWithEmailAndPassword(email, password).then(newUser => {
// Credential is being successfully retrieved. Note "any" workaround until typescript updated.
let credential = (<any>firebase.auth.EmailAuthProvider).credential(email, password);
firebase.auth().currentUser.link(credential)
.then(user => { return user; })
.catch(err => console.log(err)); // Returns auth/provider-already-linked error.
});
不应调用CreateUserWithEmailandPassword
来升级匿名用户。这将注册一个新用户,注销当前已签名的匿名用户。
你所需要的只是用户的电子邮件和密码。相反,IDP提供商(如Google、Facebook)将要求完成他们的完整登录流程,以获得他们的令牌来识别用户。不过,我们建议对这些代码使用LinkWithPopup
或LinkWithRedirect
。
示例:
// (Anonymous user is signed in at that point.)
// 1. Create the email and password credential, to upgrade the
// anonymous user.
var credential = firebase.auth.EmailAuthProvider.credential(email, password);
// 2. Links the credential to the currently signed in user
// (the anonymous user).
firebase.auth().currentUser.linkWithCredential(credential).then(function(user) {
console.log("Anonymous account successfully upgraded", user);
}, function(error) {
console.log("Error upgrading anonymous account", error);
});
我有以下场景:使用firebase Auth对用户进行匿名身份验证。然后,他用电子邮件和密码登录到一个现有的账户。然后,他再次从账户中注销。现在,我想重新创建他以前使用过的匿名帐户。 是否可以在设备上本地存储匿名凭据,并在以后再次登录匿名帐户时使用它们?我想保存访问/刷新令牌就足够了,但是firebase auth是否为此提供了API?
我有一个场景,我通过使用firebase身份验证通过匿名登录,并从匿名登录帐户,我已经从事件列表中添加了事件作为收藏夹项目,现在我想使用Google或Facebook登录,以便我最喜欢的项目永远不会丢失,每当我登录收藏夹项目必须从该登录帐户获得。 我正在使用上述场景Firebase链接。但问题是,firebase链接只对一个匿名帐户有效一次,如果我再次匿名登录并添加最喜欢的事件,现在我使用以前的方
将匿名帐户转换为永久帐户的文档指出了流程的3个步骤,但是步骤2似乎违反了步骤1。 当用户注册时,完成用户身份验证提供者的登录流程,直到(但不包括)调用其中一个身份验证提供者。用方法来表示。例如,获取用户的Google ID令牌、Facebook访问令牌或电子邮件地址和密码 获取新身份验证提供程序的身份验证凭据:
Set-ADUser:术语“Set-ADUser”不能识别为cmdlet、函数、脚本文件或可操作程序的名称。请检查名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试。行:2字符:1+Set-ADUser-identity$name-passwordneverexpires$true+~~~~~~~~~+CategoryInfo:objectnotfound:(Set-ADUser:stri
我正在尝试使用Active Merchant和active_paypal_adaptive_paymentgem集成Paypal Adaptive结账。在用户注册期间,用户需要注册他/她的PayPal帐户才能在交易期间收到付款。 我已经为activemerchant设置了所有凭据。在paypal中注册用户帐户时,我遇到以下错误。 您正在登录此事务的API调用方的帐户。请更改您的登录信息,然后重试。
我只是在复制ProductHunt。com网站和地址的网址,我得到了错误的名称错误!当我输入'localhost:8000/accounts/signup'时,它会将我带到一个html页面,这是我为测试所做的!主URL。py看起来像: 因此,它会转到帐户文件夹urls.py看起来像:从django.urls导入路径,包括从。导入视图 然后是视图。py看起来像:来自django。快捷方式导入渲染 至