REST calls to Firebase Authentication from my server

157 views
Skip to first unread message

gabin...@gmail.com

unread,
Dec 23, 2016, 9:47:02 AM12/23/16
to Firebase Google Group
Hello,

Is it possible to verify if a given User UID is valid (aka is in my list of Authenticated user) from my server ?

I'm asking this because I'm building a custom in-app system in my app and when the payment is sucessfull I'm adding an entry in Firebase Database but before doing this I wish to validate the User UID before doing so.

Thank you

Kato Richardson

unread,
Dec 27, 2016, 2:25:59 PM12/27/16
to Firebase Google Group
Hello,

It's not possible to do this via REST at present, but you can utilize the admin SDK and call verifyToken().

☼, Kato

P.S. If it's not offensive to your culture or beliefs, I'd encourage you to introduce yourself! We are a close-knit family. It's easier to keep that culture strong when we remember that there are real people on the other end of our emails. Getting to know one another by name is a great first step.


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/f1ce8b97-89a3-4556-a56e-7194becab42e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Jacob Wenger

unread,
Jan 3, 2017, 3:07:10 PM1/3/17
to fireba...@googlegroups.com
If you want to check if a given uid corresponds to a user in your user list, you can use the getUser() method in the Firebase Admin Node.js SDKSee Retrive user data for more information, including a code sample.

Cheers,
Jacob

Vladimir Silantyev

unread,
Mar 9, 2017, 1:19:06 PM3/9/17
to Firebase Google Group
How do I call the getUser method from the Admin SDK using other than node.js language?
Our backend is written on php, so I would like to call getUser from php.

Is there any documentation for REST API that used in the Firebase Admin Node.js SDK ? 


среда, 4 января 2017 г., 1:07:10 UTC+5 пользователь Jacob Wenger написал:
If you want to check if a given uid corresponds to a user in your user list, you can use the getUser() method in the Firebase Admin Node.js SDKSee Retrive user data for more information, including a code sample.

Cheers,
Jacob
On Tue, Dec 27, 2016 at 2:25 PM, 'Kato Richardson' via Firebase Google Group <fireba...@googlegroups.com> wrote:
Hello,

It's not possible to do this via REST at present, but you can utilize the admin SDK and call verifyToken().

☼, Kato

P.S. If it's not offensive to your culture or beliefs, I'd encourage you to introduce yourself! We are a close-knit family. It's easier to keep that culture strong when we remember that there are real people on the other end of our emails. Getting to know one another by name is a great first step.

On Fri, Dec 23, 2016 at 5:09 AM, <gabin...@gmail.com> wrote:
Hello,

Is it possible to verify if a given User UID is valid (aka is in my list of Authenticated user) from my server ?

I'm asking this because I'm building a custom in-app system in my app and when the payment is sucessfull I'm adding an entry in Firebase Database but before doing this I wish to validate the User UID before doing so.

Thank you

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/f1ce8b97-89a3-4556-a56e-7194becab42e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Jacob Wenger

unread,
Mar 13, 2017, 3:20:33 PM3/13/17
to fireba...@googlegroups.com
Hey Vladimir,

The REST endpoint is not documented, although we are in the process of doing that right now. I can go ahead and share with you the rough details to get you unblocked though:

Method: POST
Request body: {
  idToken: <ID_TOKEN>
}

<API_KEY> is the same API key you use to authenticate the client SDKs and can be found by clicking the "WEB SETUP" button after selecting yoru project here.

<ID_TOKEN> is a Firebase ID token for the currently logged in user. See Retrieve ID tokens on clients for more details on how to get this.

As I mentioned, we hope to have this better documented in the near future. Let me know if you run into issues in the meantime though.

Cheers,
Jacob

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages