Firebase Wordpress



Descripción

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.

Integrate Firebase. (16 total ratings) Integrate Firebase is a plugin that helps to integrate Firebase. WordPress User Integration¶. 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. I can log in, and Firebase authenticates me correctly. I checked on Firebase, and I can see the sessions authenticated by Firebase from wordpress. The Database on the plugin I am not sure if I have configured well. I let Firestore. I am trying to create a new user from the plugin (user tab) but it is not working.

The Firebase for WordPress Plugin will help a Firebase user to login to your WordPress interface – not to WordPress dashboard – from Firebase authentication. You can show user info and display data that is only available to your Firebase users.

If you want a secured implementation, with much more features, check the Interate Firebase PRO version.

Links

Instalación

If installing the plugin from wordpress.org:

  1. Upload the entire /integrate-firebase directory to the /wp-content/plugins/ directory.
  2. Activate Integrate Firebase Plugin through the ‘Plugins’ menu in WordPress.
  3. Profit.

FAQ

What can I do with this Integrate Firebase plugin?

At version 0.6.1, the user can integrate Firebase authentication to WordPress. That means you can:

  • Log in, log out and show custom data only to logged in users.
  • Get Real Time and Firestore database in Dashboard
  • Show realtime database on frontend after users log in

How can I put a shortcode in a widget or WordPress editor?

The example in this guide only shows you how to put in a PHP file. If you want to put the shortcode inside a widget or editor. You can simply do this:

[firebase_login][/firebase_login]

How can I add a login form to WordPress?

After adding Firebase credentials from Settings > Firebase. You can add login form through shortcodes:

echo do_shortcode(«[firebase_login]»);

If you want to create your own form. Please start with *

<

Wordpress Firebase Otp

form id=’login-form’>*. For submit button, you have to add ‘firebase-form-submit’ as an ID.

How can I show user info after login?

You can add a shortcode to show user’s info

echo do_shortcode(«[firebase_greetings]»);

How can I show error when a user cannot login?

You can show error message when a user cannot login by using a shortcode

echo do_shortcode(«[firebase_login_error class=»your-class-name»][/firebase_login_error]»);

How can I show data for a not logged in user?

You can put your data as an HTML code inside a shortcode

echo do_shortcode(«[firebase_show_not_login class=»your-class-name»]YOUR HTML CODE[/firebase_show_not_login]»);

How can I hide or show data for a logged in user?

You can put your data as an HTML code inside a shortcode

echo do_shortcode(«[firebase_show class=»your-class-name»]YOUR HTML CODE[/firebase_show]»);

How can I show realtime database for a logged in user?

You can put your data as an HTML code inside a shortcode. Realtime data will be shown as a table with an id #if-realtime.

echo do_shortcode(«[realtime class=»your-class-name» collection_name=»string» document_name=»string»]»);

Wordpress Firebase Push Notification

How can I log out?

This is a shortcode for log out button.

echo do_shortcode(«[firebase_logout]»);

Firebase vs wordpress

Reseñas

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.

Messaging

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.

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.

Wordpress

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.

Firebase Vs Wordpress

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.