ExFirebaseAuth.Token (ex_firebase_auth v0.1.0)

Link to this section Summary

Functions

Verifies a token agains google's public keys. Returns {:ok, userid, claims} if successful. {:error, } otherwise.

Link to this section Functions

Link to this function

verify_token(token_string)

Specs

verify_token(binary()) :: {:error, binary()} | {:ok, binary(), JOSE.JWT.t()}

Verifies a token agains google's public keys. Returns {:ok, userid, claims} if successful. {:error, } otherwise.

Examples

iex> ExFirebaseAuth.Token.verify_token("ey.some.token")
{:ok, "user id", %{}}

iex> ExFirebaseAuth.Token.verify_token("ey.some.token")
{:error, "Invalid JWT header, `kid` missing"}