firebase auth on php

576 views
Skip to first unread message

Dave Wilson

unread,
Nov 17, 2017, 1:15:40 AM11/17/17
to Firebase Google Group
So I've set up authentication which works fine using javascript on the client.

For security I believe I should be verifying the user by getting an id token from him using user.getIdToken()

Then when I send data to the php backend I should verify this token. If I paste it into https://jwt.io/ and it decodes fine.

Please please please could you provide a simple example (or even a little helper php) for veryifing and decoding this token in php.

I've spent 24 hours download different php libraries and cannot get this to work. 

I've also spent the previous 2 days working out how to interact with firestore with php. Yes I've had some success but it's really trying to design my own library from scratch which is not what I thought firebase was about.

Don't know why you're so against php, its really popular still did you know? 

Rant over. 

Kato Richardson

unread,
Nov 20, 2017, 12:45:31 PM11/20/17
to Firebase Google Group
Hi Dave,

Assuming you're working with the Realtime Database, you can find docs and examples on auth via REST here. That may be the best approach for PHP, given that we don't offer an Admin SDK in that language.

We're not against PHP by any means. But we do need to focus our energy where we think we can provide the most impact, and that's not PHP for the time being. I understand that's frustrating for you. I'm in a similar boat since I'd love to see us providing more support for desktop Unity apps. Alas, we're in the minority here, so we'll probably be limited to REST APIs for the foreseeable future.

I would, of course, encourage you to submit a feature request.

☼, Kato





--
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/ccb237d1-dc54-405c-a091-66a6d2e76273%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

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

Reply all
Reply to author
Forward
0 new messages