tokenEncryption Readonly@beta
tokenEncryption: TokenEncryption | undefined
Custom encryption to use for the persisted refresh token cache, instead of the built-in
(file-based, per-install) cipher key. For example, an Electron main-process host can supply
an adapter around safeStorage.encryptString/decryptString so tokens are protected by the
OS credential store (DPAPI/Keychain) rather than a key stored alongside the cache file.
@note If provided, it is the caller's responsibility to ensure the same tokenEncryption is
used consistently for a given tokenStorePath; otherwise, previously cached tokens become
unreadable and the user is prompted to sign in again.
Defined in
- Client.ts Line 78
Last Updated: 27 July, 2026
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.