0.0
No commit activity in last 3 years
No release in over 3 years
Verify & decode Firebase ID token on Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

FirebaseAuth

Verify & decode Firebase ID token on Ruby

Installation

Add this line to your application's Gemfile:

gem 'firebase_auth'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install firebase_auth

Usage

This library has only one method - FirebaseAuth::Auth.very_id_token. This method decodes the id token from Firebase.

token = request.headers[:authorization].sub(/^Bearer /, '')

info = FirebaseAuth::Auth.verify_id_token(token)

# info.user_id, info.email, info.name, info.picture ...

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/mu29/firebase_auth.

License

The gem is available as open source under the terms of the MIT License.