Options
All
  • Public
  • Public/Protected
  • All
Menu

Module auth/basicAuth

Index

Type aliases

AuthDelegatorOptions<Data, Channel>: { bot: SociablyBot<Channel, unknown, unknown>; checkAuthData: CheckAuthDataFn<Data, Channel>; platform: string; platformColor: string; platformImageUrl: string; platformName: string; getChatLink: any }

Type parameters

Type declaration

BasicAuthLoginState<Data>: { ch: string; data: Data; redirect: undefined | string; status: "login" }

Type parameters

  • Data

Type declaration

  • ch: string
  • data: Data
  • redirect: undefined | string
  • status: "login"
BasicAuthOptions: { appIconUrl?: string; appName?: string; codeMessageComponent?: CodeMessageComponent; loginCodeDigits?: number; loginDuration?: number; maxLoginAttempt?: number; mode?: "loose" | "strict" }

Type declaration

  • Optional appIconUrl?: string
  • Optional appName?: string
  • Optional codeMessageComponent?: CodeMessageComponent
  • Optional loginCodeDigits?: number
  • Optional loginDuration?: number
  • Optional maxLoginAttempt?: number
  • Optional mode?: "loose" | "strict"
BasicAuthState<Data>: BasicAuthLoginState<Data> | BasicAuthVerifyState<Data>

Type parameters

  • Data

BasicAuthVerifyState<Data>: { ch: string; data: Data; hash: string; redirect: undefined | string; status: "verify"; ts: number }

Type parameters

  • Data

Type declaration

  • ch: string
  • data: Data
  • hash: string
  • redirect: undefined | string
  • status: "verify"
  • ts: number
CheckAuthDataFn<Data, Channel>: (data: Data) => { channel: Channel; data: Data; ok: true } | { code: number; ok: false; reason: string }

Type parameters

Type declaration

    • (data: Data): { channel: Channel; data: Data; ok: true } | { code: number; ok: false; reason: string }
    • Parameters

      • data: Data

      Returns { channel: Channel; data: Data; ok: true } | { code: number; ok: false; reason: string }

CodeMessageComponentProps: { browserName?: string; code: string; deviceModel?: string; deviceType?: string; domain: string; ip: string; osName?: string }

Type declaration

  • Optional browserName?: string
  • code: string
  • Optional deviceModel?: string
  • Optional deviceType?: string
  • domain: string
  • ip: string
  • Optional osName?: string
VerifyCodeRequestBody: { code: string }

Type declaration

  • code: string
VerifyCodeResponseBody: { ok: boolean; redirectTo: string; retryChances: number }

Type declaration

  • ok: boolean
  • redirectTo: string
  • retryChances: number

Variables

Generated using TypeDoc