Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function browserid_auth() {
- navigator.id.getVerifiedEmail(function(assertion) {
- if (assertion) {
- $('status').innerHTML = '  signing in...'
- new Ajax.Request('/signin', {
- method: 'post',
- onSuccess : function(resp) {
- if (resp.responseText == "logged in")
- document.location = '/';
- else alert("Invalid credentials");
- },
- parameters : 'BIDASSERT='+escape(assertion),
- onFailure: function(resp) {
- $('status').innerHTML = '  failed to contact server';
- }
- });
- } else {
- $('status').innerHTML = '';
- }
- });
- }
Add Comment
Please, Sign In to add comment