Firebase authentication on wordpress website

I have a wordpress website and an android app to view this website. In the application, I somehow enabled Firebase Authentication for Facebook and Google. And as for the wordpress website, it has its own authentication system, so I want to achieve that when a user logs in through the application using Firebase Auth, the user also needs to be registered in the Wordpress database for authentication so they can access or log in into the system on the wordpress website and access it. Is there any way to achieve this? Or, if not, what would be the best way to allow a user to register on a website using the application. I think that something is missing here because of my very small knowledge. But I would be happy if someone could tell me how to achieve something like this.Thank you in advance.

+6
source share
1 answer

By the time the user logs in through the authase auth system and receives a response, your application should send the registered user information to the api register offered by wordpress in order to register this user in the wordpress system. You also need to study the implementation of the wordpress function wp_set_auth_cookiein order to mock the cookie for clients, the cookie value may be part of your api response in wordpress register. After receiving the cookie value, the android must manipulate the cookie and save the cookie in a web browser in order to automatically enter the Wordpress firewall system.

+1

Source: https://habr.com/ru/post/1016984/


All Articles