Skip to content

Instantly share code, notes, and snippets.

@codehakase
Created April 6, 2018 08:32
Show Gist options
  • Save codehakase/0bd3737ebb99e19f7f80d960a39dc43c to your computer and use it in GitHub Desktop.
Save codehakase/0bd3737ebb99e19f7f80d960a39dc43c to your computer and use it in GitHub Desktop.
function getUiConfig() {
return {
'callbacks': {
// Called when the user has been successfully signed in.
'signInSuccess': function(user, credential, redirectUrl) {
handleSignedInUser(user);
// Do not redirect.
return false;
}
},
// Opens IDP Providers sign-in flow in a popup.
'signInFlow': 'popup',
'signInOptions': [
// The Provider you need for your app. We need the Phone Auth
firebase.auth.TwitterAuthProvider.PROVIDER_ID,
{
provider: firebase.auth.PhoneAuthProvider.PROVIDER_ID,
recaptchaParameters: {
type: 'image', // another option is 'audio'
size: 'invisible', // other options are 'normal' or 'compact'
badge: 'bottomleft' // 'bottomright' or 'inline' applies to invisible.
}
}
],
// Terms of service url.
'tosUrl': 'https://www.google.com'
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment