2
votes

i would like to add firebase authentication to my android app that is based on wordpress .

I would like to provide facebook and google authentication , and automatically create a user in my wordpress database

What i have done so far

Configured WP REST API so that i can register new users Configured firebase authentication

What i need

Get user's name and email and register it in my wordpress database using my methode called createNewUser() and link them for futur login

1

1 Answers

0
votes

I didn't really understand what do you want to achieve. But if you want to get the email and name of the user, do this:

FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
user.getDisplayName();
user.getEmail();

Now if you create a user in Wordpress with this email, you will have to get a token and store it in your device. You can store it in the Android preferences system.