【发布时间】:2019-03-04 05:55:50
【问题描述】:
我正在使用 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 上的帐户配置:
【问题讨论】:
-
确保您正确配置了 Twitter OAuth 提供程序。如果是这样,也许你应该联系Firebase support
标签: javascript firebase twitter firebase-authentication twitter-oauth