Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
checkContact(user) {
if (!Auth || typeof Auth.verifiedContact !== 'function') {
throw new Error('No Auth module found, please ensure @aws-amplify/auth is imported');
}
Auth.verifiedContact(user)
.then(data => {
if (!JS.isEmpty(data.verified)) {
this.changeState('signedIn', user);
} else {
const newUser = Object.assign(user, data);
this.changeState('verifyContact', newUser);
}
});
}
checkContact(user) {
if (!Auth || typeof Auth.verifiedContact !== 'function') {
throw new Error(
'No Auth module found, please ensure @aws-amplify/auth is imported'
);
}
Auth.verifiedContact(user).then(data => {
if (!JS.isEmpty(data.verified)) {
this.changeState('signedIn', user);
} else {
const newUser = Object.assign(user, data);
this.changeState('verifyContact', newUser);
}
});
}
checkContact(user) {
if (!Auth || typeof Auth.verifiedContact !== 'function') {
throw new Error(
'No Auth module found, please ensure @aws-amplify/auth is imported'
);
}
Auth.verifiedContact(user).then(data => {
if (!JS.isEmpty(data.verified)) {
this.changeState('signedIn', user);
} else {
user = Object.assign(user, data);
this.changeState('verifyContact', user);
}
});
}
checkContact(user) {
if (!Auth || typeof Auth.verifiedContact !== 'function') {
throw new Error('No Auth module found, please ensure @aws-amplify/auth is imported');
}
Auth.verifiedContact(user)
.then(data => {
if (!JS.isEmpty(data.verified)) {
this.changeState('signedIn', user);
} else {
user = Object.assign(user, data);
this.changeState('verifyContact', user);
}
});
}
checkContact(user) {
if (!Auth || typeof Auth.verifiedContact !== 'function') {
throw new Error('No Auth module found, please ensure @aws-amplify/auth is imported');
}
Auth.verifiedContact(user)
.then(data => {
if (!JS.isEmpty(data.verified)) {
this.changeState('signedIn', user);
} else {
user = Object.assign(user, data);
this.changeState('verifyContact', user);
}
});
}