-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encrypting/Decrypting problem with JWT Firebase RS256 #189
Comments
Hi, Anyone could know what the problem is? Thanks in advance, GSDiama |
Same problem here. 'RS256' encoded tokens don't seem to be encoded properly. |
Hi ! I know is a little late, but i was having the same problem and i fixed with this : $publicKeyURL = 'https://www.googleapis.com/robot/v1/metadata/x509/securetoken@system.gserviceaccount.com';
$key = json_decode(file_get_contents($publicKeyURL), true);
$decoded = JWT::decode($token, $key, array('RS256')); I just passed the full array as $key to the decode function, and it worked. |
I am also getting the same problem. I have tried your way @nicoworq but i get this error ""kid" empty, unable to lookup correct key" @mwakaambrose did you manage to find a solution ? |
Does this issue still persists? |
The kid empty issue has been resolved with this PR #505 Hope this resolves the issue, thank you for the discussion |
Hi everybody,
I don't know what I'm not doing right but Firebase custom token created with this JWT library can't be decoded properly.
Encoding process (PHP 5.4):
It returns a JWT that I store in the app in order to check the validity of the comming events. If I go to jwt.io I get an invalid signature message.
Decoding process (PHP 5.4):
$jwt is the JWT returned by the server.
I get Fatal error: Class 'SignatureInvalidException' not found in /var/www/vhosts/XXXXX.local/jwt.php on line 92
If I go deeper, I see that when it does:
openssl_verify($msg, $signature, $key, $algorithm);
The error message returned by openssl_error_string() is:
error:0407006A:rsa routines:RSA_padding_check_PKCS1_type_1:block type is not 01
I have read in the net that it seems to be a key issue, but I have checked everything and seems OK.
I will much appreciate if you could help me because I have been with this issue for 3 days.
Thank you very much in advance,
GSDiama
The text was updated successfully, but these errors were encountered: