Skip to content

hasGenericPassword() ​

ts
function hasGenericPassword(options?): Promise<boolean>

Checks if generic password exists for the given service.

Parameters ​

• options?: BaseOptions

A keychain options object.

Returns ​

Promise<boolean>

Resolves to true if a password exists, otherwise false.

Example ​

typescript
const hasPassword = await Keychain.hasGenericPassword();
console.log('Password exists:', hasPassword);

Defined in ​

index.ts:92