Skip to content

Instantly share code, notes, and snippets.

@zinyando
Last active May 5, 2017 10:22
Show Gist options
  • Save zinyando/de925b99f5b2d1b62654cc2fe6acaa78 to your computer and use it in GitHub Desktop.
Save zinyando/de925b99f5b2d1b62654cc2fe6acaa78 to your computer and use it in GitHub Desktop.
export interface AuthInterface {
    // tracks if user is authenticated or not
    isAuthenticated: boolean;
    // token returned when the user is authenticated
    token: string;
    // user object that’s returned by firebase
    user: object;

    // create authentication session 
    open() : void;
    // restore an existing authentication session if session token is available
    // this is useful when user is returning to an already authenticated application
    fetch() : void;
    // destroy the existing session ie. logout
    close() : void;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment