无法让 Twitter 与 firebaseUI web 一起使用
Can't get Twitter to work with firebaseUI web
我正在使用 FirebaseUI 进行网站身份验证。我让它很容易与 Google 和 Facebook 一起工作,但对于 Twitter,我收到以下错误消息:"Unable to determine the authorization endpoint for the specified provider. This may be an issue in the provider configuration."
这是我的配置:
// 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 应用程序的配置。
您必须进入 https://developer.twitter.com 的权限选项卡并检查 "Request email address from users" :
我正在使用 FirebaseUI 进行网站身份验证。我让它很容易与 Google 和 Facebook 一起工作,但对于 Twitter,我收到以下错误消息:"Unable to determine the authorization endpoint for the specified provider. This may be an issue in the provider configuration."
这是我的配置:
// 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 应用程序的配置。 您必须进入 https://developer.twitter.com 的权限选项卡并检查 "Request email address from users" :