Module firebase_token

Helper module for generating custom Firebase token in Erlang.

Copyright © 2016 Ruel Pagayon

Version: 1.0.0

Authors: ruel@ruel.me.

Description

Helper module for generating custom Firebase token in Erlang. Custom Firebase tokens are used on applications with totally different authentication methods. These tokens are in JWT (JSON Web Token) format and can be then used by client applications on authenticating to Firebase.

Only supports Firebase 3.x.x. See https://firebase.google.com/docs/auth/server/create-custom-tokens for more information.

Function Index

generate/4Generates the custom Firebase token.
load_account/1Creates a service_account() from JSON key file or url.

Function Details

generate/4

generate(Account::map(), Uid::uid(), Life::integer(), Extra::map()) -> {token, binary()}

Generates the custom Firebase token.

load_account/1

load_account(Path::string()) -> map() | {error, invalid_account}

Creates a service_account() from JSON key file or url


Generated by EDoc, Oct 2 2016, 01:58:14.