Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// @ts-ignore
federated.oauth_config = Object.assign(
{},
federated.oauth_config,
// @ts-ignore
oauth.awsCognito
);
}
// @ts-ignore
if (oauth.auth0) {
// @ts-ignore
federated.auth0 = Object.assign({}, federated.auth0, oauth.auth0);
}
if (JS.isEmpty(federated)) {
return null;
}
const {
google_client_id,
facebook_app_id,
amazon_client_id,
oauth_config,
auth0,
} = federated;
const theme = this.props.theme || AmplifyTheme;
return (
<div>
<div>{this.google(google_client_id)}</div>
<div>{this.facebook(facebook_app_id)}</div></div>
throw new Error('No Auth module found, please ensure @aws-amplify/auth is imported');
}
const { oauth={} } = Auth.configure();
// backward compatibility
if (oauth['domain']) {
federated.oauth_config = Object.assign({}, federated.oauth_config, oauth);
} else if (oauth.awsCognito) {
federated.oauth_config = Object.assign({}, federated.oauth_config, oauth.awsCognito);
}
if (oauth.auth0) {
federated.auth0 = Object.assign({}, federated.auth0, oauth.auth0);
}
if (JS.isEmpty(federated)) { return null; }
const { google_client_id, facebook_app_id, amazon_client_id, oauth_config, auth0 } = federated;
const theme = this.props.theme || AmplifyTheme;
return (
<div>
<div>
{this.google(google_client_id)}
</div>
<div>
{this.facebook(facebook_app_id)}
</div>
<div>
{this.amazon(amazon_client_id)}
</div>
<div></div></div>
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);
}
});
}
.then(data => {
if (!JS.isEmpty(data.verified)) {
this.changeState('signedIn', user);
} else {
user = Object.assign(user, data);
this.changeState('verifyContact', user);
}
});
}
.then(data => {
if (!JS.isEmpty(data.verified)) {
this.changeState('signedIn', user);
} else {
const newUser = Object.assign(user, data);
this.changeState('verifyContact', newUser);
}
});
}
.then(data => {
if (!JS.isEmpty(data.verified)) {
this.changeState('signedIn', user);
} else {
user = Object.assign(user, data);
this.changeState('verifyContact', user);
}
});
}
Auth.verifiedContact(user).then(data => {
if (!JS.isEmpty(data.verified)) {
this.changeState('signedIn', user);
} else {
user = Object.assign(user, data);
this.changeState('verifyContact', user);
}
});
}