Skip to content
GuidesToolkitAPI

enablePersistentCredentialStore

enablePersistentCredentialStore(options?): Promise<void>

Defined in: packages/expo-arcgis/src/auth.ts:149

Swaps the in-memory credential stores for persistent ones, kept in the platform’s secure storage (the iOS keychain, Android’s encrypted storage). There are two:

  • the ArcGIS credential store: tokens and OAuth sign-ins;
  • the network credential store: logins to IWA servers, client certificates and trusted hosts, which the toolkit’s <Authenticator> adds.

After this call, any credential added to them survives app restarts: via setTokenCredential, signInWithOAuth, setAppCredential, the automatic challenge handler, or an <Authenticator>. The Swift Toolkit’s setupPersistentCredentialStorage does the same.

Call once on app start, before any secured resource is loaded. Awaiting it ensures the swap is complete before the SDK attempts to make any authenticated request.

Registered on the geometry module (not the main module) to stay within the Android JVM 64 KB method-size limit.

PersistentCredentialStoreOptions

Promise<void>