ProtectedKeychain
Secret storage whose reads require the user to authenticate with a strong biometric (Class 3 on Android; Face ID or Touch ID on Apple platforms). Writing, deleting, and clearing need no authentication.
Each entry is protected by a key that is invalidated when biometric enrollment changes, so adding a fingerprint or face makes existing entries unreadable: read then throws KeychainUnavailableException with AuthenticationInvalidated, and the caller must delete the entry and write it again after the user signs in another way.
Supported on Android (API 23+), iOS 15+, and macOS 12+ in apps with keychain entitlements. tvOS, watchOS, and desktop JVM stores throw Unsupported from every operation.
Obtain an instance with forCurrentPlatform. On Android, use the overload that takes a Context and an activity provider instead.