Inspect stored credentials during authentication debugging
Investigate credential and token state in your React Native app using explicitly allowed secure-storage keys in local development.
SecureStorage tools help you investigate which credentials or tokens are stored when debugging authentication behavior. They can read, replace, or remove explicitly allowed values in the native secure store; keep access limited to the keys and local workflow you need.
Warning: Every tool in this suite is Critical because it can expose or mutate secrets. Keep the allow-list narrow and only enable this suite when you explicitly need secure-storage inspection or repair.
Register the Suite
await Ansight.initializeAndActivate(
Ansight.createOptionsBuilder()
.withRemoteTools({
secureStorage: {
appleService: "com.example.app",
preferencesName: "secure_debug",
allowedKeys: ["debug_token"],
allowedKeyPrefixes: ["debug."],
},
})
.withAllToolAccess()
.build(),
);
Registration API
withRemoteTools({ secureStorage: ... }): configures native secure-storage options.remoteTools.secureStorage.appleService: iOS Keychain service.remoteTools.secureStorage.preferencesName: Android secure-storage preferences name.remoteTools.secureStorage.allowedKeys/allowedKeyPrefixes: restrict keys.- top-level
secureStorageis accepted as a compatibility alias.
Specific Concerns
- Values may contain credentials, tokens, or other secrets.
- Keep key allow-lists narrow.
- All secure-storage tools use
critical, including reads, and requirewithAllToolAccess()because their values are secrets.
Tool Matrix
| Name | Id | Policy | Description |
|---|---|---|---|
Get Secure Storage Value | secure.get_value | Critical | Reads a secure-storage value. |
Set Secure Storage Value | secure.set_value | Critical | Writes a secure-storage value. |
Remove Secure Storage Key | secure.remove_key | Critical | Deletes a secure-storage key. |
Tool Details
Use these tools only for explicit local debugging and repair workflows. Keep the key allow-list narrow.