A service which handles session management for a front-end application

  • Refresh token + access token in local storage
  • Fingerprint in local storage (generated randomly)
  • User id fetched from initial refresh call

Hierarchy

Constructors

Properties

MAX_RETRY_ATTEMPTS: number = 15
opts: undefined | SessionServiceInitializer
sessionState: SessionStateWithTokens = ...

Methods

  • Type Parameters

    • T

    • U extends object

    Parameters

    • method: "get" | "delete" | "post" | "patch"
    • url: string
    • headers: Partial<RawAxiosHeaders & {
          Accept: AxiosHeaderValue;
          Authorization: AxiosHeaderValue;
          Content-Encoding: AxiosHeaderValue;
          Content-Length: AxiosHeaderValue;
          User-Agent: AxiosHeaderValue;
      } & {
          Content-Type: ContentType;
      }>
    • Optional body: U
    • options: AxiosRequestOptions = ...

    Returns Promise<T>

Generated using TypeDoc