Function: setGenericPassword()
setGenericPassword(
username
,password
,serviceOrOptions
?):Promise
<false
|Result
>
Saves the username
and password
combination for the given service.
Parameters
• username: string
The username or e-mail to be saved.
• password: string
The password to be saved.
• serviceOrOptions?: string
| Partial
<object
& BaseOptions
>
A keychain options object or a service name string. Passing a service name as a string is deprecated.
Returns
Promise
<false
| Result
>
Resolves to an object containing service
and storage
when successful, or false
on failure.
Example
await Keychain.setGenericPassword('username', 'password');