kreait / firebase-tokens-php

A PHP library to work with Firebase tokens
MIT License
223 stars 33 forks source link

Support session cookie #42

Closed arma7x closed 2 years ago

arma7x commented 2 years ago

Allow the package to verify session cookie

jeromegamez commented 2 years ago

Thank you very much for your contribution, it's much appreciated!

I merged your PR with d5b8ed8704285d551e94e0da5581416f247ad811 and added a SessionCookieVerifier in addition to the IdTokenVerifier because I felt they both serve different purposes.

Even if they use 90% of the same code 😅, I don't mind the code duplication, and an important difference between the two is that Session Cookies currently doesn't support tenant IDs (the Firebase API returns an UNSUPPORTED_TENANT_OPERATION error when I tried).

I will try to implement your other PR on the SDK (https://github.com/kreait/firebase-php/pull/683) soon, and make the changes there accordingly.

Thanks again! 🌺

arma7x commented 2 years ago

Ok, thanks for feedback