Packages

A small library for verifying FirebaseAuth ID tokens. See Firebase documention: https://firebase.google.com/docs/auth/admin/verify-id-tokens#verify_id_tokens_using_a_third-party_jwt_library

Retired package: Deprecated - No longer maintained\! Seek other alternatives or fork/take over

Current section

Files

Jump to
Raw

lib/client.ex

defmodule FirebaseAuthVerifier.Client do
use Tesla
@moduledoc """
A simple Tesla client to request the signing certificate that
will be used to verify the signature.
"""
plug Tesla.Middleware.BaseUrl,
Application.get_env(:firebase_auth_verifier, :cert_url) || raise "Base URL has not been set for FirebaseAuthVerifier"
plug Tesla.Middleware.JSON
def get_certificates do
get("/")
end
end