Sha256: b22d765e843ea7bcd36064e698ffe1564f0600ae867cbfb044a5333d4d54346d

Contents?: true

Size: 1.22 KB

Versions: 2

Compression:

Stored size: 1.22 KB

Contents

// FirebaseUI config.
var uiConfig = {
  callbacks: {
    signInSuccessWithAuthResult: function(currentUser, credential, redirectUrl) {
      // Return type determines whether we continue the redirect automatically
      // or whether we leave that to developer to handle.
      return true;
    },
    uiShown: function() {
      // The widget is rendered, hide the loader.
      document.getElementById('loader').style.display = 'none';
    }
  },
  signInSuccessUrl: '/',
  signInOptions: [
  // Specify providers you want to offer your users.
  firebase.auth.EmailAuthProvider.PROVIDER_ID
  ],
  // Comment the next line to activate CredentialHelper
  credentialHelper: firebaseui.auth.CredentialHelper.NONE,
  // Terms of service url can be specified and will show up in the widget.
  tosUrl: '{{ site.amazon-s3 }}/assets/pdf/documents/terms-and-conditions.pdf',
  // Privacy policy url/callback.
  privacyPolicyUrl: function() {
    window.location.assign('{{ site.amazon-s3 }}/assets/pdf/documents/privacy-notice.pdf');
  }
};

// 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);

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jekyll-theme-marketing-1.0.1 _includes/components/firebase/ui.js
jekyll-theme-marketing-1.0.0 _includes/components/firebase/ui.js