Last active
August 29, 2015 14:01
-
-
Save sedouard/4362b0e809cee4fa4669 to your computer and use it in GitHub Desktop.
Example of oauth AndContinue for Windows Phone 8.1 (javascript)
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
try{ | |
//Windows 8/8.1 | |
Windows.Security.Authentication.Web.WebAuthenticationBroker | |
.authenticateAsync(Windows.Security.Authentication.Web.WebAuthenticationOptions.default, startURI, endURI) | |
.then(function(result){ | |
console.log('handle your provider specific token inside ' + result.responseData); | |
}, function(error){ | |
console.error(error); | |
}); | |
} | |
catch(err) | |
{ | |
//Windows Phone 8.1 will throw a Not Implemented exception when you call authenticateAsync. Use authenticateAndContinue instead | |
//continuation is handled in the acivation handler | |
Windows.Security.Authentication.Web.WebAuthenticationBroker.authenticateAndContinue(startURI, endURI); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment