googlearchive / firebase-token-generator-ruby

Firebase Token Generator for Ruby
MIT License
60 stars 18 forks source link

Compatibility with Firebase 3.0 #7

Open akshayrawat opened 8 years ago

akshayrawat commented 8 years ago

The docs (2.4) mention this gem (& equivalent others) in https://www.firebase.com/docs/web/guide/login/custom.html. However the new docs (3.0) have no mention of it. Does this type of JWT authentication still work with 3.0?

bwalton commented 8 years ago

This is the first wall I hit when I was moving an app from 2.4 to 3. My current token generation setup doesn't work as I'm getting:

The custom token format is incorrect. Please check the documentation.

The docs mention ruby-jwt and looks significantly different than this library.

jrasanen commented 8 years ago

I get the same error, can't find any info on their migration page either

jrasanen commented 8 years ago

I guess this library is deprecated, see: https://firebase.google.com/docs/auth/server#use_a_jwt_library - they're using ruby-jwt there.

jrasanen commented 8 years ago

After generating a token with ruby-jwt, I get an error "The custom token corresponds to a different audience."

mumayank commented 8 years ago

@jrasanen Same here. Anyone from @firebase please respond.

hunterleaman commented 8 years ago

Any update here?

coolbnjmn commented 8 years ago

bump

soyoh commented 8 years ago

Actually, it works following the instructions in this page:

https://firebase.google.com/docs/auth/server/create-custom-tokens#create_custom_tokens_using_a_third-party_jwt_library plus creating the corresponding services account, following the instructions here: https://firebase.google.com/docs/server/setup

I have the same json on the instructions, no new info to add, so i cannot give more info than the links. good luck.

Edit: so, this library is no longer needed, just use the JWT ruby library to create the new JWT