How to use firebaseui - 10 common examples

To help you get started, we’ve selected a few firebaseui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MobileTribe / panda-lab / agent / src / components / auth / AuthPage.vue View on Github external
if (getRuntimeEnv() == RuntimeEnv.ELECTRON_RENDERER) {
                            vue.onSignInSuccessWithAuthResult();
                            return false;
                        } else {
                            return true;
                        }
                    },
                    uiShown: function () {
                        // The widget is rendered.
                        // Hide the loader.
                    }
                },
                signInSuccessUrl: '/home',
                signInOptions: Services.getInstance().config.authProviders,
            };
            let ui = firebaseui.auth.AuthUI.getInstance() ? firebaseui.auth.AuthUI.getInstance() : new firebaseui.auth.AuthUI(firebase.auth());
            ui.start('#firebaseui-auth-container', uiConfig);

            console.log(Services.getInstance().config.authProviders);
        }
github presstube / norman / js / firebasestore-multiuser.js View on Github external
firebase.auth().onAuthStateChanged(user => {
  if (user) {
    console.log('already signed in')

    // firebase.auth().signOut()


  } else {
    const ui = new firebaseui.auth.AuthUI(firebase.auth())
    ui.start('#firebaseui-auth-container', {
      signInOptions: [
        firebase.auth.GoogleAuthProvider.PROVIDER_ID,
      ],
      callbacks: {
        signInSuccess: () => false,
      }
    })
  }
})
github Dappos / Dappos / src / components / FirebaseUi.vue View on Github external
startUi () {
      // Initialize the FirebaseUI Widget using Firebase.
      let ui = firebaseui.auth.AuthUI.getInstance()
      if (!ui) {
        ui = new firebaseui.auth.AuthUI(firebase.auth())
      }
      console.log('isPendingRedirect() → ', ui.isPendingRedirect())
      // The start method will wait until the DOM is loaded.
      // if (ui.isPendingRedirect()) {
      //   ui.start('#firebaseui-auth-container', uiConfig);
      // }
      const el = document.getElementById('firebaseui-auth-container')
      if (!el) return
      ui.start('#firebaseui-auth-container', uiConfig)
    },
  }
github firebase / quickstart-nodejs / auth-sessions / script.js View on Github external
}
    },
    'signInFlow': 'popup',
    'signInOptions': [
      {
        provider: firebase.auth.GoogleAuthProvider.PROVIDER_ID
      },
      {
        provider: firebase.auth.EmailAuthProvider.PROVIDER_ID,
        // Whether the display name should be displayed in Sign Up page.
        requireDisplayName: true
      }
    ],
    // Terms of service url.
    'tosUrl': 'https://www.google.com',
    'credentialHelper': firebaseui.auth.CredentialHelper.NONE
  };
}
github rechenberger / firestore-query-browser / src / app / components / login / login.component.ts View on Github external
initUI() {
    const ui = new firebaseui.auth.AuthUI(this.auth.auth);
    // The start method will wait until the DOM is loaded.
    const uiConfig = {
      signInSuccessUrl: '',
      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: ''
    }
github PAK90 / mtg-hunter / src / index.js View on Github external
bannedRestrictedOperator: "AND",
      cyclesOperator: "AND",
      rulesTextOperator: "AND",
      flavourTextOperator: "AND",
      typeLineOperator: "AND",
      gathererOperator: "AND",
      coloursOnly: false,
      colourIdentityOnly: false};
    // Bind the prop function to this scope.
    this.handleClick = this.handleClick.bind(this)
    
    Firebase.initializeApp(fbconfig[0]);

    // Initialize the FirebaseUI Widget using Firebase.
    // Need to 'this' them so they can be used by the modal popup.
    this.ui = new firebaseui.auth.AuthUI(Firebase.auth());
    this.uiConfig = {
      'signInSuccessUrl': 'mtg-hunter.com',
      //'signInSuccessUrl': 'localhost:3333',
      '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
      ],
      'signInFlow': 'popup',
      callbacks: {
        signInSuccess: function(currentUser, credential, redirectUrl) {
          //alert("Signed in as "+currentUser + " with credential " + credential);
        this.setState({"showLoginModal":false}); // For now going to use email as 
github cerebro-iiitv / cerebro-web / src / components / signIn / index.js View on Github external
constructor(props) {
		super(props);
		if (!window.authUi) window.authUi = new firebaseui.auth.AuthUI(firebase.auth());
	}
github hursey013 / budget-duo / src / components / SignIn.js View on Github external
componentWillUnmount() {
    const { onRedirect } = this.props;

    onRedirect(false);
  }

  uiConfig = {
    signInOptions: [
      this.props.firebase.auth.GoogleAuthProvider.PROVIDER_ID,
      this.props.firebase.auth.TwitterAuthProvider.PROVIDER_ID,
      {
        provider: this.props.firebase.auth.EmailAuthProvider.PROVIDER_ID,
        requireDisplayName: false
      }
    ],
    credentialHelper: firebaseui.auth.CredentialHelper.NONE,
    callbacks: {
      signInSuccessWithAuthResult: authResult => {
        const user = authResult.user;
        const isNewUser = authResult.additionalUserInfo.isNewUser;

        isNewUser &&
          this.props.firebase.user(user.uid).set({
            ...JSON.parse(localStorage.getItem('budgetDuoState')),
            lastSaved: this.props.firebase.timestamp()
          });

        this.props.history.push('/');
      }
    }
  };

firebaseui

Javascript library for customizable UI on top of Firebase SDK

Apache-2.0
Latest version published 1 year ago

Package Health Score

71 / 100
Full package analysis

Popular firebaseui functions