Trovebox Android App - "Error with authentication"

41 views
Skip to first unread message

Lennert Van Alboom

unread,
Sep 23, 2014, 9:41:30 AM9/23/14
to open...@googlegroups.com
Hi there,


Installed trovebox from git (master.zip, today) and configured it; it works fine from the web interface. Also compiled and installed oauth via pecl, restarted php, etc, etc.

When attempting to connect the Android app:
- Browser is launched with an URL to login
- After login, a form asks to choose an app name, and a "create" button (*not* create and approve)
- After clicking this button, a "request" token is created (visible in web UI)
- Browser redirects to the login page, back to the "choose an app name", ad infinitum.

If I add "&tokenType=access" to the initial URL:
- The button on the form becomes "create and approve"
- After clicking it, an "access" token is created
- App gets opened, but immediately says "error with authentication"

There are no warnings nor errors in the PHP log, so I'm unsure what could be causing this. My trovebox instance is hosted on HTTPS, but not with a self signed certificate (a proper, browser-accepted one). I've tried a few different browsers - Chrome, Dolphin, Firefox - but no luck.


Any hints on how to troubleshoot this? Thanks!

Lennert Van Alboom

unread,
Oct 2, 2014, 10:34:15 AM10/2/14
to open...@googlegroups.com
Quick update, hoping anyone who knows this stuff will turn out some day.

I've re-run a test without SSL - trovebox hosted over plain HTTP. This is the php error log when I create a "request" token (see first scenario in my post above):

2014/10/02 16:24:09 [error] 24868#0: *39257 FastCGI sent in stderr: "PHP message: {severity:crit, description:"oauth_problem=parameter_absent&oauth_parameters_absent=oauth_signature%26oauth_signature_method%26oauth_nonce%26oauth_timestamp", additional:}" while reading response header from upstream, client: 1.2.3.4, server: gallery.my.domain, request: "GET /v1/oauth/authorize?oauth_consumer_key=9d27821f3d14d6579e8ba8bc0e0cc3&oauth_consumer_secret=e3c6067867&oauth_token=6e6cdab47358c1c83687f54570d024&oauth_token_secret=4f24e1918d&oauth_verifier=362dda917e HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "gallery.my.domain", referrer: "http://gallery.my.domain/v1/oauth/authorize?mobile=1"
2014/10/02 16:24:10 [error] 24861#0: *39279 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: oauth_consumer_key in /srv/www/gallery.my.domain/src/libraries/models/Credential.php on line 34
PHP message: PHP Notice:  Undefined index: oauth_consumer_key in /srv/www/gallery.my.domain/src/libraries/models/Credential.php on line 34
PHP message: PHP Notice:  Undefined index: oauth_consumer_key in /srv/www/gallery.my.domain/src/libraries/models/Credential.php on line 34
PHP message: {severity:crit, description:"oauth_problem=parameter_absent&oauth_parameters_absent=oauth_consumer_key%26oauth_signature%26oauth_signature_method%26oauth_nonce%26oauth_timestamp", additional:}" while reading response header from upstream, client: 1.2.3.4, server: gallery.my.domain, request: "GET /user/login?r=/v1/oauth/authorize?oauth_consumer_key=9d27821f3d14d6579e8ba8bc0e0cc3&oauth_consumer_secret=e3c6067867&oauth_token=6e6cdab47358c1c83687f54570d024&oauth_token_secret=4f24e1918d&oauth_verifier=362dda917e HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "gallery.my.domain", referrer: "http://gallery.my.domain/v1/oauth/authorize?mobile=1"
2014/10/02 16:24:10 [error] 24861#0: *39279 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: oauth_consumer_key in /srv/www/gallery.my.domain/src/libraries/models/Credential.php on line 34" while reading upstream, client: 1.2.3.4, server: gallery.my.domain, request: "GET /user/login?r=/v1/oauth/authorize?oauth_consumer_key=9d27821f3d14d6579e8ba8bc0e0cc3&oauth_consumer_secret=e3c6067867&oauth_token=6e6cdab47358c1c83687f54570d024&oauth_token_secret=4f24e1918d&oauth_verifier=362dda917e HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "gallery.my.domain", referrer: "http://gallery.my.domain/v1/oauth/authorize?mobile=1"

It appears to complain about absent parameters - oauth_signature, oauth_signature_method, oauth_nonce, oauth_timestamp.

The second scenario (forcefully adding &tokenType=access to the URL) does not result in a single error whatsoever in the PHP log, just like before, but it still gives the dreaded "error with authentication".
Reply all
Reply to author
Forward
0 new messages