Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Authentication on wordpress website

I have a wordpress website and an android WebView app to access that website. On the app somehow, I have integrated firebase Authentication for Facebook and Google . And, as for the wordpress website it has its own Authentication system so, what I want to achieve is when a user registers through the app using firebase Auth system the user should also be registered on the wordpress Authentication database so that they can access or login into the wordpress website and access it. Is there a way to achieve this? Or if not, what would be the best way to let user register to the website using the app. I think I am missing something here because of my very little knowledge. But, I would be happy if someone could point me a way on how to achieve something as this. Thank you in advance.

like image 235
Akang Toshi Avatar asked May 04 '17 11:05

Akang Toshi


1 Answers

By the time the user register through firbase Auth system and get the response, your app should send the registerred user info to the register api offerred by wordpress to register this user in wordpress system. You also need to look into the implementation of wordpress function wp_set_auth_cookie to mock the login cookie for clients, the cookie value may be part of your wordpress register api's response. After getting the cookie value, android need to manipulate the cookie and save the cookie to webview in order to auto login to wordpress admin backend system.

like image 67
mark Avatar answered Sep 20 '22 07:09

mark