Skip to content

Instantly share code, notes, and snippets.

@ahilles107
Created March 26, 2012 11:38
Show Gist options
  • Save ahilles107/2204544 to your computer and use it in GitHub Desktop.
Save ahilles107/2204544 to your computer and use it in GitHub Desktop.
FlexSocial BrowserID
...
}, function(){
// run code when connection is ready
flex.social.browserid.init();
$('.loginPage #browserid').click(function(){
flex.social.browserid.login(function(result, data, assertion) {
if(result === true) {
// result == {
// "status": "okay",
// "email": "contact@flexpi.com",
// "audience": "http://flexpi.com",
// "expires": 1308859352261,
// "issuer": "browserid.org"
// }
}
});
return false;
})
});
</script>
<body>
...
<a href="#" id="browserid" title="Sign-in with BrowserID">
<img alt="Sign-in with BrowserID" src="https://browserid.org/i/sign_in_blue.png"> with BrowserID
</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment