MonoCloud Authentication SDK
    Preparing search index...
    encryptAuthState: <T extends AuthState>(
        authState: T,
        secret: string,
        ttl?: number,
    ) => Promise<string>

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

    Type Declaration

      • <T extends AuthState>(
            authState: T,
            secret: string,
            ttl?: number,
        ): Promise<string>
      • Type Parameters

        Parameters

        • authState: T

          A type that extends the AuthState interface.

        • secret: string

          The secret used for encryption.

        • Optionalttl: number

          Optional time-to-live in seconds, after which the auth state expires.

        Returns Promise<string>

        Encrypted auth state string.