3

We have an app that uses a Firebase database for users and they can register and log in using the app.

I need a way to get this functionality in the website for the app but the website is a Wordpress site and currently has no "user" functionality (no registration, login, dashboard, etc.).

I expected this would be a common use case and there would be a number of simple, widely used plugins to integrate it, but this is not the case.

Does anyone have any experience they can share with how they integrated firebase into a wordpress site, or any advice on how to do it?

Thanks for any help.

5
  • What do you actually want to do with the firebase user on the WordPress site? Jul 5, 2018 at 10:29
  • I want users to be able to register on the site and input their email, password, number, name of their organization, and a promo code field. This ideally then registers them on the Firebase database. Potentially then I would have a page on the site that would display their information from the app (account balance, transaction history) from the firebase database. Jul 5, 2018 at 10:48
  • 1
    But you're not using the account information for anything else in WordPress? Like posting? If that's the case WordPress doesn't really come into it. You'd do the same thing you'd do to create a registration form/profile page on any HTML page and then just put that into a shortcode/template. Jul 5, 2018 at 10:50
  • Correct! I don't know how to create a shortcode, so do you think I would be better off just doing up Raw HTML and Raw JS to create a form and use firebase cdn scripts in the JS? Jul 5, 2018 at 14:37
  • John, there is a WP Plugin out there that I used before. wordpress.org/plugins/integrate-firebase Apr 10, 2019 at 16:04

2 Answers 2

1

WordPress itself provides you with a function called register_new_user() which can be used to create a user-account in your WP instance.

You will have to write some kind of integration between your Firebase DB and WordPress but this function would probably be the way to go.

1

There is a documentation on how to log in to WordPress with a Firebase User.

The idea is to have a system dominates the other, in this case, it's Firebase. When a user logs in through Firebase, it will also create another user in WordPress which allows you login to the WordPress dashboard.

https://firebase-wordpress-docs.readthedocs.io/en/latest/wordpress-user-integration.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.