30-04-2021



This feature solves the authentication problem. This is an example from one of my potential clients. The client has a mobile app (Firebase users), and they want those users to login to a separate WordPress website without registering again.

And this plugin can help you to achieve just that. Authentication also work for WordPress multisite.

At this stage, it helps to authenticate to WordPress dashboard with a subscriber or customer role (WooCommerce). And the password will be dominated by Firebase Users. User cannot change password when logging into WordPress dashboard. They have to use forgot password feature in Firebase in order to create a new password. And if the password is different in both systems, the next time user logs in through FirebaseUI Web shortcode, it will change the password in WordPress automatically.

Support: Social Logins, Email and Phone Number.

Even though the plugin allows Firebase users to log in to WordPress at the same time, best scenario is to use WordPress as backend for Firebase without allowing users to login to WordPress. Enable FirebaseUI Web; Register & Login Form; One Tap Sign Up & Email Link Sign In; WordPress User Integration; Firebase User Profile on WordPress. Integrate Firebase PRO is a WordPress plugin that brings Firebase features to WordPress site. Sign in to WordPress and Firebase with one tap / email link or read & write to Firbase from WordPress.

WordPress requires PHP to run on the server and Firebase Hosting can't run server-side code (no PHP) but only static content (html, images, js, etc). So the answer is, you can't install WordPress in the Firebase. Since v0.17.0, you only need to update security rules on your database (realtime / firestore), so any can write to your database or they have to log in before saving.It totally depends on the firebase security rules. Note: if you use ‘Contact 7 Redirect’ feature, it may not work properly because the redirect may interfere with the sync process. Use Firebase products together to solve complex challenges and optimize your app experience. Personalize your onboarding flow, grow user engagement, or add new functionality with Firebase.

Firebase UID will be used as WordPress username. If they have display name from Firebase (e.g. Google login), it will update WordPress display name for a friendly user experience.

Prerequisite¶

You need to deploy the cloud functions in order to use this feature properly. The cloud functions will help to secure the authentication process between WordPress & Firebase.

Login to WP Dashboard with Firebase Users¶

Important:Before doing this, you should keep a dashboard open for yourself, and open another private window in order to login with an email from Firebase, then assign the Admin right to that user before you log out of current window - to make sure that you can log in again with your Firebase user (with **admin** rights).

In case of logging out without assign another user with admin rights, you can rename the plugin folder, and login as usual.

This flow will utilize FirebaseUI Web workflow in order to authenticate users. In order to that, you have to log in to WordPress Dashboard, then Dashboard > Firebase > Auth.

Check Allow Login to WP Dashboard and enter you Login Url. It could be your homepage or a separate page just for logging in. From now, everytime users navigate to https://your-webiste.com/wp-admin, it will redirect to your new login page.

This page will contain the shortcode for logging in.

New WP Login Page

After users log in, it will create a new user in WordPress if the user doesn’t exist. Then authenticate it to WordPress dashboard automatically. In PRO - v1.17.0, while user logging in, there will be a loading state that prevents users from navigating to other pages until the login process is completed.

One thing to notice that, after user logs in via the plugin shortcode, the firebase uid is saved in user metadata, and you can retrive it by using this example.

Notice: the WordPress username defaults to Firebase UID, and their display name will be set as Firebase Display Name or Phone Number (via phone authentication). User can change their display name if they want. This is only affect since v1.4.0

When users log out from dashboard, that means they will also be logged out to Firebase.

Create a new WordPress User through API¶

The Integrate Firebase PRO has its own Restful API endpoints that help to create a new WordPress user.In this scenario, when you have a mobile app, and you want to duplicate user in WordPress, you can call the API to create a new User after user register on your app.

Last updated: Apr 24, 2021


Follow Twitter for updates.

Integrate Firebase PRO is a WordPress plugin that brings Firebase features to WordPress site. E.g. sign in to WordPress and Firebase with one tap / email link or read & write to Firbase from WordPress.

Demo site: https://wordpress.dalenguyen.me

Download plugin: https://firebase.dalenguyen.me

Video Tutorials: Youtube Playlist - Firebase WordPress Integration

If you are interested in the development progress, please check the Road map.

Products¶

  • Integrate Firebase PRO - v2.8.0
  • Firebase WordPress Functions - v1.0.0 (bundle with PRO plugin)
  • Integrate Firebase Woocommerce - v2.0.0 (Extension)
  • Integrate Firebase Users - v1.1.0 (Extension)
  • Integrate Firebase Template - v1.0.0 (Extension)

First steps¶

This guide is mostly for the PRO version, if you are using the FREE version, please refer to the WordPress.org Guide

Authentication¶

Even though the plugin allows Firebase users to log in to WordPress at the same time, best scenario is to use WordPress as backend for Firebase without allowing users to login to WordPress.

Database¶

From WordPress, users can retrieve or write data from Firebase Realtime / Firestore using shortcodes.

Cloud Storage¶

Firebase wordpress

Cloud Storage is built for app developers who need to store and serve user-generated content, such as photos or videos.

Analytics¶

At the heart of Firebase is Google Analytics, a free and unlimited analytics solution.

Firebase Features¶

Hooks¶

Wordpress Firebase Authentication

Actions & Filters that help to communicate with Firebase.

Developers¶

Wordpress Firebase Push Notification

If you are a developer, there is no limit that you cannot extend the plugin bases on you needs. Here are some examples.

Extensions¶

List of plugins that can integrate with Integrate Firebase PRO

Wordpress Firebase Cloud Messaging

Usecases¶

Use Cases for Integrate Firebase PRO

WordpressWordpress

Firebase Wordpress Authentication

Miscellaneous¶