Created
April 16, 2012 19:47
-
-
Save jthomas/2401041 to your computer and use it in GitHub Desktop.
Authenticating user to access restricted feeds
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
<html> | |
<script src="./lib/require.js"></script> | |
<script> | |
require.config({ | |
paths : { | |
//create alias to plugins (not needed if plugins are on the baseUrl) | |
async: 'src/async', | |
goog: 'src/goog', | |
propertyParser : 'src/propertyParser' | |
} | |
}); | |
//use plugins as if they were at baseUrl | |
require(['goog!gdata,2,packages:[calendar]'], function(){ | |
console.log("checking auth. status... ", google.accounts.user.checkLogin("https://www.google.com/calendar/feeds")); | |
}); | |
</script> | |
<body> | |
<button onclick="google.accounts.user.login('https://www.google.com/calendar/feeds');">Authenticate</button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment