Skip to content
This repository has been archived by the owner on Feb 14, 2018. It is now read-only.

Persona login error via pagekite reverse tunnel #426

Closed
jasonkgreen opened this issue Jul 30, 2014 · 10 comments
Closed

Persona login error via pagekite reverse tunnel #426

jasonkgreen opened this issue Jul 30, 2014 · 10 comments

Comments

@jasonkgreen
Copy link

I have a node.js instance of SFW running in a debian VM which is also running pagekite to reverse tunnel to the wider world.

I can access the instance as localhost:3000 on the VM and successfully log in via Persona, but I get a "Login failure: unable to log you in" error popup when I try to do the same thing via the pagekite reverse tunnel. Pagekite support says that pagekite is just tunneling and I should get the same thing I would on localhost, but I'm not getting that.

@ozten
Copy link

ozten commented Jul 30, 2014

Is the protocol, hostname or port number different when you are using Pagekite?

The Persona config values must match what is in your address bar, otherwise an "audience mismatch" will happen.

@jasonkgreen
Copy link
Author

Aha, The port 3000 of the original instance is shifted to port 80 (I think) when it goes through pagekite. It may cause a hostname change as well. Is there a way to get SFW to run over port 80?

@paul90
Copy link
Contributor

paul90 commented Jul 30, 2014

The server port is set using --port or -p

The Persona audience is set using --url, which you will need to set as this defaults to http://localhost

@jasonkgreen
Copy link
Author

I had to use pm2 to start it b/c of some node flakiness. Would you end up with something like

pm2 start something.js -p 80 --url http://site.i.want.example.com

?

@paul90
Copy link
Contributor

paul90 commented Jul 30, 2014

Not sure, as I don't use pm2, but I think you will want something like

pm2 start path_to_fedwiki/index.js -- -p 80 --url http://site.i.want.example.com

pm2 parameters will need to come before the --

@almereyda
Copy link
Contributor

What about wiki farms (--farm) here?

I'm running one locally serving ~6 local wikis which are occasionally synced (either by file system/db sync, in this setup supposedly even by forking between the LAN and WAN instances run by a farm, or sooner or later mediated via browser) to public facing wikis.

@jasonkgreen
Copy link
Author

Paul -- It didn't throw an error when I passed the parameters, but I still couldn't get Persona login to work. Not sure why

Jon -- It's only login and editing that won't work remotely. I can fork from it without problem. My Persona difficulties mean that I have to be logged in from the VM localhost to make changes. This is a smaller problem in the grand scheme of things,

I'm now getting an error about alternate addresses, which is more than I was getting. The --port flag doesn't seem to affect the port SFW is running on.

@paul90
Copy link
Contributor

paul90 commented Aug 1, 2014

Just tried pm2, as far as I can see you need to remove the app from the process list before starting it with different parameters, using pm2 delete, but it appears to work as expected.

@jasonkgreen
Copy link
Author

Got it. Actually it's
pm2 stop [id of wiki process]
pm2 delete [id of wiki process]
pm2 start ./index.js -- -p 3000 --url http://mysubdomain.pagekite.me

You need to tell persona what port SFW is running on, rather than the port it's forwarded to via pagekite.

Thanks for all the help.

@WardCunningham
Copy link
Owner

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants