Last active
August 29, 2015 14:18
-
-
Save lkdocs/8a87b6a9f5180236c6c6 to your computer and use it in GitHub Desktop.
LaunchKey Node.js SDK - Check Status
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
var error = function (error) { | |
console.log("Error encountered: [" + error.code + "] " + error.message); | |
}, | |
poll = function (authRequest) { | |
launchKey.checkStatus( | |
authRequest, | |
function (authRequest) { | |
console.log("User accepted launch request " + authRequest.getId()); | |
}, | |
function (authRequest) { | |
console.log("User denied launch request " + authRequest.getId()); | |
}, | |
poll, | |
error | |
); | |
}; | |
launchKey.authenticate("LaunchKey Username", poll, error); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment