mozilla-services / syncserver

Run-Your-Own Firefox Sync Server
Mozilla Public License 2.0
1.87k stars 145 forks source link

Unable to authenticate (bis) #116

Closed mirabellette closed 6 years ago

mirabellette commented 6 years ago

Hi hi everyone,

My configuration 192.168.1.1 -> virtual machine ip address

I enable this parameters in syncserve.ini

public_url = http://192.168.1.1:5000/ sqluri = sqlite:////opt/syncserver/syncserver_data.db
secret = ***** force_wsgi_environ = false

I got some issues with Firefox syncserver.

I installed it in a virtual machine which can access to internet. There is an Apache reverse proxy in front of it. It looks to work well because when I request https://domainName.eu, I receive it works!.

I have a Firefox account.

My tests I modify in browser the value of identity.sync.tokenserver.uri with https://domainName.eu/token/1.0/sync/1.5

I restart my browser but Firefox asks me to reconnect to sync again and again and again. When I am looking for the Apache log, I got a HTTP answer from https://domainName.eu/token/1.0/sync/1.5 with 401 code.

I thought it was Apache2.4 which made trouble so I made a NAT redirection directly to the firefoxserver. Unfortunately, I got the same problem in the Firefox browser (asking for sign in)

When I run sudo -u user make serve ; the server starts well but I didn't get any new message from the console when I request . https://domainName.eu -> "it works" in my browser https://domainName.eu/token/1.0/sync/1.5 -> .json answer with Unauthorized

Do you have some idea ?

rfk commented 6 years ago

public_url = http://192.168.1.1:5000/ ... I modify in browser the value of identity.sync.tokenserver.uri with https://domainName.eu/token/1.0/sync/1.5

The public_url setting as to be the URL of your server as seen by the browser, so I would expect it to be "https://domainName.eu" base on your example here.

force_wsgi_environ = false

You could also try flipping this to true and see if that helps, which would narrow down the problem.

mirabellette commented 6 years ago

Hello rfk,

I was able to fix my issue! Even if I changed the public_url with the correct one, I got an error from syncserver. I set the force_wsgi_environ to true and it works :)

I created an article to help new user to install syncserver. I hope it will help others to install it.

Thank you for your help.