-
Notifications
You must be signed in to change notification settings - Fork 376
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
Proper way to verify Firebase id tokens #216
Comments
In your case this is the right solution. The double decoding process itself should not impact the overall performance of your app. If you experience any problems with performance let us know. The first |
Thanks @excpt for your response so we follow the right direction then 👍 I have prepared a post on medium describing some pit fails when work with Firebase JWT. https://medium.com/@igorkhomenko/how-to-validate-firebase-id-token-in-ruby-23f4f54c89ab maybe someone will find it useful and save some time |
@soulfly I recommend to make one change in your blog post. This is not a official JWT thing. There is only the official JWT RFC. This is "just" a ruby implementation of that RFC and I am just the maintainer. So you got an answer from the ruby-jwt maintainers. ;) |
@excpt got it :) thank you |
@soulfly that help me a lot, thank you. |
Also I stumbled upon this library @soulfly |
Hello, sorry for commenting even though this is closed!. |
@omartorresrios I have tried the code above and worked well. |
Hi guys,
I use
ruby-jwt
gem to decode and verify Firebase id tokensHere is a quick brief how it works, what needs to be done
https://firebase.google.com/docs/auth/admin/verify-id-tokens#verify_id_tokens_using_a_third-party_jwt_library
I have a question about signature validation
As you see we do not know RSA public key before decoding
So it looks like we have to decode 2 times our JWT token using ruby-jwt' gem
So I came up with the following solution:
Could you please verify that this is a right solution, that we need to decode it twice in Firebase case
thank you
The text was updated successfully, but these errors were encountered: