Last active
December 27, 2018 17:52
-
-
Save way2datta/ed781267a154b7a08b3c55f6d677af10 to your computer and use it in GitHub Desktop.
Login to the system and send access code via email or sms notifications.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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