Skip to content

Instantly share code, notes, and snippets.

@way2datta
Last active Dec 27, 2018
Embed
What would you like to do?
Login to the system and send access code via email or sms notifications.
function login(email, password, sendEmail, sendSMS) {
// logic for user authentication
this.authenticate(username, password);
// logic to fetch user, access code, message content, settings login token in storage
if(sendEmail) {
// logic to send access code via email
}
if(sendSMS) {
// logic to send access code via email
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment