☰ Contents

SSO Login


This Feature uses Google Firebase and allows the login with Google, Firebase Email and Password, Facebook, and Github

Setup

Well need a Firebase project, then we’ll configure Disciple.Tools.

Firebase App Config

Create a firebase project on https://console.firebase.google.com with any name. Analytics is not needed.

Web app

From the dashboard click to app a web. Choose any nickname. Save the settings that look like this. We’ll need them later.

const firebaseConfig = {
  apiKey: "AIza-***",
  authDomain: "disciple-tools-auth.firebaseapp.com",
  projectId: "disciple-tools-auth",
  storageBucket: "disciple-tools-auth.appspot.com",
  messagingSenderId: "*********",
  appId: "******"
};

Authentication

From the Left Side Menu select Build then select Authentication.

On the Authentication tab, add the providers you want to enable (Google, Email and Pass, Facebook, etc).

Google example:

Click Add new provider. Then Google. Enable the Provider. Choose a name that users will see, like “disciple-tools-auth”.

Allowed Domains

Go to the Settings tab. Under Authorized Domain, add the domain of your D.T instance. Examples: “disciple.tools” or “*.disciple.tools”

D.T setup

Head over Settings (D.T) > SSO Login. On a multisite, with the D.T multisite plugin, go to the Network Admin > Disciple.Tools > SSO Login.

Open the Firebase tab.

Form the firebaseConfig above, add the apiKey value AIza… to the Firebase API Key, the projectId value to Firebase Project ID and appId to Firebase App ID. Click save.

On the General tab, set the Enable Custom Login Page to “on” and save.

On the Identity Providers tab set the “Google” provider to “on” and save.

Log out and give it a try!

Troubleshooting

  • Error message “Class “Firebase\JWT\Key” not found may indicate an old version of the mobile app plugin is being used.



Section Contents

Last Modified: September 22, 2023