Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function getLoginCredentialsFromBrowser () {
const creds = await navigator.credentials.get({'password': true});
if (creds && creds.type == 'password' && u.isValidJID(creds.id)) {
await _converse.setUserJID(creds.id);
return {'jid': creds.id, 'password': creds.password};
}
}