kreait / firebase-tokens-php

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

Firebase\Auth\Token\Exception\UnknownKey #35

Closed yadavsaurabh7 closed 3 years ago

yadavsaurabh7 commented 3 years ago

Key with ID "%s" not found.

I Have found one more solution to this issue is other than what people have suggested is to add this one more URL which has the keys that were used to sign idTokens coming from kotlin android app and ios app

kreait/ firebase-token/src/Firebase/Auth/Token/HttpKeyStore

const KEYS_URL_1 = 'https://www.googleapis.com/robot/v1/metadata/x509/securetoken@system.gserviceaccount.com'; const KEYS_URL_2 = 'https://www.googleapis.com/oauth2/v1/certs';

then the keys array will have all 4 keys (2 web keys and the other 2 keys as well)

Can we have this added in the coming version on kreait/firebase-tokens-php

jeromegamez commented 3 years ago

Thank you 🌺! I'll implement this shortly 💪

jeromegamez commented 3 years ago

This will take longer than anticipated, unfortunately. Honestly, I overengineered this library one step at a time and this makes this normally trivial task more complicated than it should be - unfortunately, it needs to so that the library stays backward compatible with the projects that are using it (namely the Firebase PHP SDK 😅)

Long story short: it will be done, it will just take some time 🤞

jeromegamez commented 3 years ago

Okay, I had a run and it went faster than expected. Here's the new release 1.15.0. Please let me know if something doesn't work 🙏, and thanks again for bringing it up! 💪