Package version:

Interface TokenCachePersistenceOptions

Parameters that enable token cache persistence in the Identity credentials.

interface TokenCachePersistenceOptions {
    enabled: boolean;
    name?: string;
    unsafeAllowUnencryptedStorage?: boolean;
}

Properties

enabled: boolean

If set to true, persistent token caching will be enabled for this credential instance.

name?: string

Unique identifier for the persistent token cache.

Based on this identifier, the persistence file will be located in any of the following places:

  • Darwin: '/Users/user/.IdentityService/'
  • Windows 8+: 'C:\Users\user\AppData\Local\.IdentityService\'
  • Linux: '/home/user/.IdentityService/'
unsafeAllowUnencryptedStorage?: boolean

If set to true, the cache will be stored without encryption if no OS level user encryption is available. When set to false, the PersistentTokenCache will throw an error if no OS level user encryption is available.