Created
May 30, 2021 16:31
-
-
Save bibhuticoder/d4d93e513e229cafd095c156a5d15b71 to your computer and use it in GitHub Desktop.
This file contains 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
export const verifyOtp = (request_id, code, callback) => { | |
vonage.verify.check({ request_id, code }, (err, result) => { | |
if (err) { | |
console.error(err); | |
callback(false); | |
} else { | |
if (result.status != '0') { | |
console.log("====verify err====", result); | |
callback(false); | |
} else { | |
callback(result); | |
console.log("====verify success====", result); | |
} | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment