View Source FirebaseAuth

A tool for verifying Firebase Auth token

installation

Installation

def deps do
  [
    {:firebase_auth, "~> 0.1.0"}
  ]
end

usage

Usage

Verifying a token

FirebaseAuth.verify_token("token string", "project_id")
iex> {:ok,
 %{
   "aud" => "project_id",
   "auth_time" => 1680000000,
   "email" => "...",
   "email_verified" => true,
   "exp" => 1684000000,
   "firebase" => %{
     "identities" => %{
       "email" => ["..."],
       "google.com" => ["..."]
     },
     "sign_in_provider" => "..."
   },
   "iat" => 1681000000,
   "iss" => "https://securetoken.google.com/project_id",
   "sub" => "...",
   "user_id" => "..."
 }}