useIdentityPlugin(cachePersistencePlugin); // The plugin has the capability to extend `DeviceCodeCredential` and to // add middleware to the underlying credentials, such as persistence. constcredential = newDeviceCodeCredential({ tokenCachePersistenceOptions: { enabled:true, }, });
Extend Azure Identity with additional functionality. Pass a plugin from a plugin package, such as:
@azure/identity-cache-persistence: provides persistent token caching@azure/identity-vscode: provides the dependencies ofVisualStudioCodeCredentialand enables itExample: