Skip to main content

Class: LocalAuth

Defined in: auth/LocalAuth.ts:21

Authentication strategy based on local files. Stores credentials and Signal keys on disk so you don't have to rescan the QR on every startup. Internally it uses Baileys' useMultiFileAuthState.

Implements

Constructors

Constructor

new LocalAuth(options?): LocalAuth

Defined in: auth/LocalAuth.ts:24

Parameters

options?

LocalAuthOptions = {}

Returns

LocalAuth

Accessors

sessionPath

Get Signature

get sessionPath(): string

Defined in: auth/LocalAuth.ts:30

On-disk path where this session is persisted.

Returns

string

Methods

clear()

clear(): Promise<void>

Defined in: auth/LocalAuth.ts:38

Deletes the persisted session (after logout). Optional.

Returns

Promise<void>

Implementation of

AuthStrategy.clear


getAuthState()

getAuthState(): Promise<{ }>

Defined in: auth/LocalAuth.ts:34

Returns the authentication state and a saveCreds function that the client will call whenever something changes.

Returns

Promise<{ }>

Implementation of

AuthStrategy.getAuthState