max-mapper / blockplot

[alpha] explore minecraft worlds in your browser
http://blockplot.com
Other
44 stars 8 forks source link

Auth problem #17

Closed dirkk0 closed 10 years ago

dirkk0 commented 10 years ago

Hi,

another problem - but this might not be related to your code, but rather to the persona login (btw: persona will be continued but without regular staff, unfortunately) .

I started both servers and they seem to listen as intended: beefy (v2.1.1) is listening on http://127.0.0.1:9966 and auth server running on 8080

When I try to log in I see on the Chrome console: Uncaught SecurityError: Blocked a frame with origin "https://login.persona.org" from accessing a frame with origin "http://pixel.servegame.org:8080". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match. but although the persona login seems to work ok I get furthermore: POST http://pixel.servegame.org:8080/_persona/login 500 (Internal Server Error) bundle.js:21790 Uncaught Error: error code 500: response not ok: audience mismatch: domain mismatch

Similar effect on Firefox.

Thanks, Dirk

max-mapper commented 10 years ago

Oh sorry, I very recently ripped the authentication out of this app, but forgot to update the readme -- will do now.

The server folder isn't used by the blockplot web app anymore. In the future I may add the server again, but for now the app runs 100% client side. The server allowed you to share a minecraft map and give a URL to someone else to view it, but I didn't have time to maintain the server and finish everything.

dirkk0 commented 10 years ago

I see. How would I change the code to listen to 0.0.0.0 rather that listen to 127.0.0.1? By grepping I see there are various calls to localhost.

max-mapper commented 10 years ago

The dev server is https://github.com/chrisdickinson/beefy, but I'm not sure how to set the hostname w/ it.

Another option is that you can run npm run build and simply serve the blockplot folder with any http server that you want as a static site.

max-mapper commented 10 years ago

It looks like beefy only passes in the port, and therefore uses the default node.js host https://github.com/chrisdickinson/beefy/blob/master/lib/cli.js#L34

A PR to beefy would be needed to add a host option as well

dirkk0 commented 10 years ago

Cool, with python -m SimpleHTTPServer it works ok!