yoavram / markx

Markdown editor for scientific writing. Batteries included.
Other
319 stars 43 forks source link

Herko & GitHub integration #20

Closed yoavram closed 11 years ago

yoavram commented 11 years ago

I deployed Markx on Heroku (http://markx.herokuapp.com/) but there is a problem - GitHub integration doesn't work, I get this message on the JS console:

XMLHttpRequest cannot load https://api.github.com/users/yoavram/repos?type=all&per_page=1000&sort=updated&1360445203928. Origin http://markx.herokuapp.com is not allowed by Access-Control-Allow-Origin. 

There is already an open issue on Github.js (michael/github#35) about this. There is also a closed issue (michael/github#8) with some hints on how to solve this.

yoavram commented 11 years ago

I got an email from @captn3m0 that explains how to solve this issue:

The error you get is because you have not created a github application with the correct domain. The code works on localhost, because someone has already made an app with localhost as the domain. However, the same code won't run on heroku because the domain is not whitelisted on github. To get it to whitelist, you need to create an application. You can create one at github.com/settings/applications/new

So I will soon solve it, hopefully, and close this issue.

karthik commented 11 years ago

That's awesome. I figured it was something that simple. This doesn't mean that every user has to authorize the app, right?

On Sunday, February 10, 2013 at 8:22 AM, Yoav Ram wrote:

I got an email from @captn3m0 (https://github.com/captn3m0) that explains how to solve this issue:

The error you get is because you have not created a github application with the correct domain. The code works on localhost, because someone has already made an app with localhost as the domain. However, the same code won't run on heroku because the domain is not whitelisted on github. To get it to whitelist, you need to create an application. You can create one at github.com/settings/applications/new (http://github.com/settings/applications/new)

So I will soon solve it, hopefully, and close this issue.

— Reply to this email directly or view it on GitHub (https://github.com/yoavram/markx/issues/20#issuecomment-13353301)..

yoavram commented 11 years ago

Well, I just created an application on GitHub called Markx, and now it works - I didn't change any code, the sign in is still a basic username password sign in, no OAuth stuff. I guess it just lets GitHub know how is responsible for markx.herokuapp.com. We should probably change it to OAuth some time, but I'm reluctant to mess with it now, it's not so simple... Anyway, it works now, you can sign in to GitHub from the heroku app. I'm closing this issue.