我正在使用FirebaseUI进行网站身份验证。我可以使其与Google和Facebook一起轻松地工作,但是对于Twitter,我收到以下错误消息:“无法确定指定提供者的授权端点。这可能是提供者配置中的问题。”
这是我的配置:
// Initialize Firebase
var config = {
apiKey: "<api key>",
authDomain: "<app name>.firebaseapp.com",
databaseURL: "https://<app name>.firebaseio.com",
projectId: "<app name>",
storageBucket: "<app name>.appspot.com",
messagingSenderId: "<messaging sender ID>"
};
firebase.initializeApp(config);
/* Return firebaseUI configuration */
function getUiConfig (handleSignedInUser) {
return {
callbacks: {
// Called when the user has been successfully signed in.
signInSuccessWithAuthResult: function (authResult, redirectUrl) {
if (authResult.user) {
handleSignedInUser(authResult);
}
},
uiShown: function () {
$('#firebase-loading').hide();
$('#firebase-loaded').show();
}
},
signInOptions: [
// Google
{
provider: firebase.auth.GoogleAuthProvider.PROVIDER_ID,
// Required to enable this provider in One-Tap Sign-up.
authMethod: 'https://accounts.google.com',
customParameters: {
// Forces account selection even when there is only one account available.
prompt: 'select_account'
}
},
// Facebook
{
provider: firebase.auth.FacebookAuthProvider.PROVIDER_ID,
scopes :['email'],
customParameters: {
// Forces password re-entry.
auth_type: 'reauthenticate'
}
},
// Twitter
firebase.auth.TwitterAuthProvider.PROVIDER_ID,
// E-mail
{
provider: firebase.auth.EmailAuthProvider.PROVIDER_ID,
requireDisplayName: false
}
]
};
}
// Initialize the FirebaseUI Widget using Firebase.
var ui = new firebaseui.auth.AuthUI(firebase.auth());
以及我在firebase上的帐户配置:
答案 0 :(得分:0)
错误来自我的Twitter应用程序的配置。 您必须进入https://developer.twitter.com的权限标签,然后选中“向用户请求电子邮件地址”: