encryptAuthState<T>(authState:T,secret:string,ttl?:number):Promise<string>
Encrypts an AuthState object with a secret and optional time-to-live (TTL).
| Type Parameter |
|---|
T extends AuthState |
| Parameter | Type | Description |
|---|---|---|
authState | T | A type that extends the AuthState interface. |
secret | string | The secret used for encryption. |
ttl? | number | Optional time-to-live in seconds, after which the auth state expires. |
Promise<string>
Encrypted auth state string.