diff --git a/index.js b/index.js index 74ad6dd..e07e0b8 100644 --- a/index.js +++ b/index.js @@ -203,6 +203,19 @@ export function setGenericPassword( ); } +/** + * Saves the `username` for further use on get requests. + * @param {string} username Associated username or e-mail to be saved. + * @return {Promise} Resolves to `true` when successful + */ +export function setUsername( + username: string +): Promise { + return RNKeychainManager.setUsername( + username + ); +} + /** * Fetches login combination for `service`. * @param {string|object} serviceOrOptions Reverse domain name qualifier for the service, defaults to `bundleId` or an options object.