Options
All
  • Public
  • Public/Protected
  • All
Menu

Module components/authContext

Index

Type aliases

Variables

Functions

Type aliases

authArgs

authArgs: object

Type containing all the arguments needed to create a context authorization info and functionality.

Type declaration

  • login: function
      • (): void
      • Returns void

  • logout: function
      • (): void
      • Returns void

  • status: authenticationStatus
  • token: string

authenticationStatus

authenticationStatus: "loading" | "unauthenticated" | "authenticated" | "no-auth"

Type enumerating the possible authentication states.

Variables

Const authContext

authContext: Context<authArgs> = ...

The context which can be used by other components to get auth data.

Functions

AuthProvider

  • AuthProvider(props: object): Element
  • Context provider that gets authorization token.

    Parameters

    • props: object
      • children: ReactNode
      • settings: authSettings

    Returns Element

Made by Horyus. Documentation generated by TypeDoc.