Skip to content

Instantly share code, notes, and snippets.

@calthoff
Created November 16, 2017 20:11
Show Gist options
  • Save calthoff/be95d678adcb1d545046c64eda3fecd5 to your computer and use it in GitHub Desktop.
Save calthoff/be95d678adcb1d545046c64eda3fecd5 to your computer and use it in GitHub Desktop.
script(src="https://cdn.firebase.com/libs/firebaseui/2.4.1/firebaseui.js")
link(href='https://cdn.firebase.com/libs/firebaseui/2.4.1/firebaseui.css', rel='stylesheet')
script.
// FirebaseUI config.
var uiConfig = {
signInSuccessUrl: '/login',
signInOptions: [
// Leave the lines as is for the providers you want to offer your users.
//firebase.auth.GoogleAuthProvider.PROVIDER_ID,
firebase.auth.FacebookAuthProvider.PROVIDER_ID,
// firebase.auth.TwitterAuthProvider.PROVIDER_ID,
//firebase.auth.GithubAuthProvider.PROVIDER_ID,
firebase.auth.EmailAuthProvider.PROVIDER_ID,
//firebase.auth.PhoneAuthProvider.PROVIDER_ID
],
// Terms of service url.
tosUrl: '<your-tos-url>'
};
// Initialize the FirebaseUI Widget using Firebase.
var ui = new firebaseui.auth.AuthUI(firebase.auth());
// The start method will wait until the DOM is loaded.
ui.start('#firebaseui-auth-container', uiConfig);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment