How to use the react-native-keychain.resetInternetCredentials function in react-native-keychain

To help you get started, we’ve selected a few react-native-keychain examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oblador / react-native-keychain / test_index.js View on Github external
hasInternetCredentials('server').then(result => {
  (result: boolean);
});

// $FlowExpectedError - First argument is required
getInternetCredentials();
getInternetCredentials('server', simpleOptions).then(credentials => {
  if (credentials) {
    (credentials.username: string);
    (credentials.password: string);
  }
});

// $FlowExpectedError - First argument is required
resetInternetCredentials();
resetInternetCredentials('server', simpleOptions).then(result => {
  (result: void);
});

// $FlowExpectedError - First two arguments are required
setGenericPassword();
setGenericPassword('username', 'password').then(result => {
  (result: boolean);
});
setGenericPassword('username', 'password', 'service');
setGenericPassword('username', 'password', simpleOptions);

getGenericPassword().then(result => {
  (result: boolean | SharedWebCredentials);
});
getGenericPassword('service');
getGenericPassword(simpleOptions);
github developmentseed / observe / app / services / auth.js View on Github external
},
        {
          key: requestToken,
          secret: requestTokenSecret
        }
      )
    )
  })

  const {
    oauth_token: accessToken,
    oauth_token_secret: accessTokenSecret
  } = querystring.parse(await accessTokenResponse.text())

  // update credentials
  await Keychain.resetInternetCredentials(Config.API_URL)
  await Keychain.setInternetCredentials(
    Config.API_URL,
    accessToken,
    accessTokenSecret
  )
}
github StoDevX / AAO-React-Native / views / settings / index.ios.js View on Github external
async resetCredentials(username: string) {
    await Keychain.resetInternetCredentials(username)
    console.log('Credentials successfully deleted')
  }
github WalletConnect / walletconnect-demo-app / src / helpers / keychain.ts View on Github external
export async function keychainDelete(key: string) {
  try {
    await resetInternetCredentials(key);
    console.log(`Keychain: removed value for key: ${key}`);
  } catch (err) {
    console.log(
      `Keychain: failed to remove value for key: ${key} error: ${err}`
    );
  }
}
github rainbow-me / rainbow / src / model / keychain.js View on Github external
export async function remove(key) {
  try {
    await resetInternetCredentials(key);
    console.log(`Keychain: removed value for key: ${key}`);
  } catch (err) {
    console.log(`Keychain: failed to remove value for key: ${key} error: ${err}`);
  }
}
github developmentseed / observe / app / services / auth.js View on Github external
export async function clearCredentials () {
  if (Config.PREAUTH_URL != null) {
    await Keychain.resetInternetCredentials(Config.PREAUTH_URL)
    await CookieManager.clearAll()
  }

  await Keychain.resetInternetCredentials(Config.API_URL)
}
github infinitered / ignite-bowser / boilerplate / app / utils / keychain.ts View on Github external
export async function reset(server?: string) {
  if (server) {
    await ReactNativeKeychain.resetInternetCredentials(server)
    return true
  } else {
    const result = await ReactNativeKeychain.resetGenericPassword()
    return result
  }
}
github StoDevX / AAO-React-Native / views / sis / loginstuff.js View on Github external
export function clearLoginCredentials() {
  return Keychain.resetInternetCredentials(SIS_LOGIN_CREDENTIAL_KEY)
}
github N3TC4T / artunis-mobile / src / libs / vault.js View on Github external
purge: (type: string) => {
        Keychain.resetInternetCredentials(type);
    },
};
github UCSD / campus-mobile / app / util / auth.js View on Github external
destroyPublicAccessToken() {
		return Keychain
			.resetInternetCredentials(publicTokenSiteName)
			.then(() => (true))
	},
	/**