Guest User

Untitled

a guest
Jan 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. function browserid_auth() {
  2. navigator.id.getVerifiedEmail(function(assertion) {
  3. if (assertion) {
  4. $('status').innerHTML = '&nbsp signing in...'
  5. new Ajax.Request('/signin', {
  6. method: 'post',
  7. onSuccess : function(resp) {
  8. if (resp.responseText == "logged in")
  9. document.location = '/';
  10. else alert("Invalid credentials");
  11. },
  12. parameters : 'BIDASSERT='+escape(assertion),
  13. onFailure: function(resp) {
  14. $('status').innerHTML = '&nbsp failed to contact server';
  15. }
  16. });
  17. } else {
  18. $('status').innerHTML = '';
  19. }
  20. });
  21. }
Add Comment
Please, Sign In to add comment