Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • GoogleAuthentifier

Index

Constructors

Properties

authorisationDataCache: AuthorisationCache
credentials?: CredentialsBody
secret_key: string
signInUserUrlTemplate: string = 'https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=%(key)s'
signUpUserUrlTemplate: string = 'https://www.googleapis.com/identitytoolkit/v3/relyingparty/signupNewUser?key=%(key)s'
tokenRefreshUrlTemplate: string = 'https://securetoken.googleapis.com/v1/token?key=%(key)s'

Methods

  • buildSignInUserUrl(): string
  • buildSignUpUserUrl(): string
  • buildTokenRefreshUrl(): string
  • isCacheValid(): boolean
  • Test if the authorisation cache is valid

    example
    authentifierInstance.isCacheValid().then(console.log)
    

    Returns boolean

  • obtainAuthorisationToken(): Promise<string>
  • Always obtain a valid authorisation token

    example
    authentifierInstance.obtainAuthorisationToken().then(console.log)
    

    Returns Promise<string>

  • Sign in

    example

    Sign in with instance credentials

    authentifierInstance.signIn().then(console.log)
    
    example

    Sign in with new credentials

    authentifierInstance.signIn({
    email: "my@mail.com",
    password: "myPassword"
    }).then(console.log)

    Parameters

    Returns Promise<AuthorisationCache>

  • Sign up a new user

    example

    Sign up as anonymous

    authentifierInstance.signUp().then(console.log)
    
    example

    Sign up as new user

    authentifierInstance.signUp({
    email: "my@mail.com",
    password: "myPassword"
    }).then(console.log)

    Parameters

    Returns Promise<AuthorisationCache>

Generated using TypeDoc