Skip to content

Instantly share code, notes, and snippets.

@way2datta
Last active December 27, 2018 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save way2datta/ed781267a154b7a08b3c55f6d677af10 to your computer and use it in GitHub Desktop.
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.
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