Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Auth.verifiedContact(user).then(data => {
if (!isEmpty(data.verified)) {
this.handleAuthStateChange(AuthState.SignedIn, user);
} else {
user = Object.assign(user, data);
this.handleAuthStateChange(AuthState.VerifyContact, user);
}
});
}
render() {
if (!Object.values(AuthState).includes(this.authState)) {
return null;
}
if (isEmpty(this.federated)) {
return null;
}
const { amazonClientId, auth0Config, facebookAppId, googleClientId, oauthConfig } = this.federated;
return (
<div>
{googleClientId && (
<div>
</div>
)}</div>
async checkContact(user) {
if (!Auth || typeof Auth.verifiedContact !== 'function') {
throw new Error(NO_AUTH_MODULE_FOUND);
}
try {
const data = await Auth.verifiedContact(user);
if (!isEmpty(data.verified)) {
this.handleAuthStateChange(AuthState.SignedIn, user);
} else {
user = Object.assign(user, data);
this.handleAuthStateChange(AuthState.VerifyContact, user);
}
} catch (error) {
logger.error(error);
throw new Error(error);
}
}
Auth.verifiedContact(user).then(data => {
if (!isEmpty(data.verified)) {
this.handleAuthStateChange(AuthState.SignedIn, user);
} else {
user = Object.assign(user, data);
this.handleAuthStateChange(AuthState.VerifyContact, user);
}
});
}