Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

config

config: Config

logger

logger: Logger

mixin

mixin: (base: Constructor<{ requestUpdate?: any }>) => SalteAuthMixedIn<{ auth: SalteAuth }>

Type declaration

storage

Accessors

key

  • get key(): string

Methods

Private $secure

emit

  • emit(name: "login" | "logout", error?: Error, data?: EventWrapper): void

handler

  • Returns a handler that matches the given name.

    Parameters

    • Optional name: string

      the name of the handler

    Returns Handler

    the handler with the given name, if no name is specified then the default handler.

login

  • login(options: AuthOptions): Promise<void>
  • login(provider: string): Promise<void>
  • Login to the specified provider.

    Parameters

    Returns Promise<void>

  • Login to the specified provider.

    Parameters

    • provider: string

      the provider to login with

    Returns Promise<void>

logout

  • logout(options: AuthOptions): Promise<void>
  • logout(provider: string): Promise<void>
  • Logout of the specified provider.

    Parameters

    Returns Promise<void>

  • Logout of the specified provider.

    Parameters

    • provider: string

      the provider to logout of

    Returns Promise<void>

off

  • off(name: string, listener: Function): void

on

  • on(name: "login", listener: (error?: Error, data?: EventWrapper) => void): void
  • on(name: "logout", listener: (error?: Error, data?: EventWrapper) => void): void

provider

  • Returns a provider that matches the given name.

    Parameters

    • Optional name: string

      the name of the provider

    Returns Provider

    the provider with the given name.

redirectUrl

  • redirectUrl(type: "login" | "logout"): string

Protected required

  • required(...keys: string[]): void

Generated using TypeDoc