Comments (8)
just following up I switched to oauth, and tried just showing a user
user.show('mtc2013', function(err, user) {});
I get "Uncaught TypeError: undefined is not a function" on line 32 of gtihub.js
from github.
from github.
I did see that and I tried switching to var xhr = new window.XMLHttpRequest() and the error goes away, but now I just get undefined:
var user = github.getUser();
var gist = github.getGist(5534034);
user.show('mtc2013', function(err, user) {
alert(user);
});
gist.read(function(err, gist) {
alert(gist);
});
the pop ups just say undefined ... :-(
from github.
ah, I had them wrapped in a jquery $(function() {} have moved them out and now it's working - sorry to have bothered you. BTW, I would love to know if I can support that "authorise with github" button with just github.js or if I need to pull stuff in from prose.io. Github.js seems to be designed to work with a hardcoded particular user - I'd really like users of my system to be able to authenticate against their own accounts rather than using mine ...
from github.
@tansaku, You will probably need more than just github.js. Do you have your own application set up on GitHub to authenticate with the GitHub API? You may want to take a look at GateKeeper (written for prose.io, I think). I'm using it with a combination of github.js and some custom code to let users authorize with their GitHub accounts for a chrome extension. You can checkout my blog post for more details.
from github.
You can authenticate with github.js using basic auth (username & password combos, easy to use but insecure really) or auth tokens - either Authorised App Tokens (based on client/secrets) or Personal Access Tokens (set up using the web UI).
More info on creating a token here:
https://help.github.com/articles/creating-an-access-token-for-command-line-use
and creating them during web app flow/on the fly here:
http://developer.github.com/v3/oauth/
Hope that helps.
from github.
In order to use OAuth, you probably want to integrate this little server piece.
https://github.com/prose/gatekeeper
from github.
Oh this was already mentioned... anyways.
from github.
Related Issues (20)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from github.