Sign in

encryptAuthState

encryptAuthState<T>(authState: T, secret: string, ttl?: number): Promise<string>

Encrypts an AuthState object with a secret and optional time-to-live (TTL).

Type Parameters

Type Parameter
T extends AuthState

Parameters

ParameterTypeDescription
authStateTA type that extends the AuthState interface.
secretstringThe secret used for encryption.
ttl?numberOptional time-to-live in seconds, after which the auth state expires.

Returns

Promise<string>

Encrypted auth state string.

© 2024 MonoCloud. All rights reserved.