firebase-php icon indicating copy to clipboard operation
firebase-php copied to clipboard

How can I get the user authentication data?

Open francesco98 opened this issue 8 years ago • 7 comments

I can easily read or write data, but what about user authentication data?

francesco98 avatar Apr 11 '16 20:04 francesco98

Can you expand on what you mean by user authentication data?

This client is for basic Firebase interactions. There are a number of pull requests to improve this but this repo isn't maintained.

alexsup avatar Apr 14 '16 15:04 alexsup

@francesco98 could you please elaborate?

ktamas77 avatar Jun 14 '16 05:06 ktamas77

I think he might be asking what I'm about to ask.

Can you validate a JWT token from the javascript client with this project? People who were using gitkit for authentication are now going to be using Firebase authentication so this should come up a lot.

Basically a php variation of the functionality provided currently in the Java and Node SDKs.

https://firebase.google.com/docs/auth/server#verify_id_tokens

String idToken;  // Get the user's ID token from the client app

FirebaseAuth.getInstance().verifyIdToken(idToken)
    .addOnSuccessListener(new OnSuccessListener<FirebaseToken>() {
        @Override
        public void onSuccess(FirebaseToken decodedToken) {
          String uid = decodedToken.getUid();
          // ...
        }
});

gbittmann avatar Jun 21 '16 21:06 gbittmann

+1

tiagojlara avatar Jul 10 '16 14:07 tiagojlara

Any plans to add user authentication?

jonmalave avatar Sep 18 '16 14:09 jonmalave

+1

ruudboon avatar Feb 04 '17 14:02 ruudboon

+1

gusdevops avatar Jun 15 '17 17:06 gusdevops