Created
February 9, 2012 13:42
-
-
Save ralphbean/1780093 to your computer and use it in GitHub Desktop.
tg2app/public/js/auth-faked.js
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
(function() { | |
var check_auth, globals; | |
globals = typeof exports !== "undefined" && exports !== null ? exports : this; | |
globals.logged_in_callback = function(user) { | |
return window.location = '/do_login?' + $.param({ | |
name: user.name, | |
access_token: globals.access_token | |
}); | |
}; | |
check_auth = function() { | |
var faked_user; | |
if (window.location.href.indexOf('waiting') !== -1) return; | |
globals.access_token = "foobarlol"; | |
faked_user = { | |
name: 'Big Bird' | |
}; | |
return globals.logged_in_callback(faked_user); | |
}; | |
$(document).ready(check_auth); | |
}).call(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment