Sign in

decryptAuthState

decryptAuthState<T>(encryptedAuthState: string, secret: string): Promise<T>

Decrypts an encrypted AuthState.

Type Parameters

Type Parameter
T extends AuthState

Parameters

ParameterTypeDescription
encryptedAuthStatestringThe encrypted auth state string to decrypt.
secretstringThe secret used for decryption.

Returns

Promise<T>

State object on success.

Throws

If decryption fails or the auth state has expired.

© 2024 MonoCloud. All rights reserved.