aaronpk / Monocle

Monocle is a reader app that talks to a Microsub server
https://monocle.p3k.io
MIT License
49 stars 8 forks source link

PHP dump immediately after login #21

Closed jernst closed 5 years ago

jernst commented 6 years ago

Logged into https://monocle.p3k.io/ with https://upon2020.com/blog/ (did not work without the path). After the redirect dance, I get this:

Array
(
    [code] => 403
    [header] => HTTP/1.1 403 Forbidden
Server: nginx/1.14.0
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/7.2.7-1+ubuntu16.04.1+deb.sury.org+1
Cache-Control: no-cache, private
Date: Wed, 27 Jun 2018 00:10:24 GMT
    [body] => {"error":"invalid_user"}
    [error] => 
    [error_description] => 
    [url] => https://aperture.p3k.io/microsub/15?action=channels
    [debug] => HTTP/1.1 403 Forbidden
Server: nginx/1.14.0
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/7.2.7-1+ubuntu16.04.1+deb.sury.org+1
Cache-Control: no-cache, private
Date: Wed, 27 Jun 2018 00:10:24 GMT

{"error":"invalid_user"}
    [headers] => Array
        (
            [Server] => nginx/1.14.0
            [Content-Type] => application/json
            [Transfer-Encoding] => chunked
            [Connection] => keep-alive
            [X-Powered-By] => PHP/7.2.7-1+ubuntu16.04.1+deb.sury.org+1
            [Cache-Control] => no-cache, private
            [Date] => Wed, 27 Jun 2018 00:10:24 GMT
        )

    [rels] => Array
        (
        )

)
jackjamieson2 commented 6 years ago

I just had the same issue. In my case, I get this erorr when I login with http://jackjamieson.net, and can log in successfully with https://jackjamieson.net.

My question: Would it be possible to avoid this sensitivity to http vs https? From a UX perspective it would be nicer to just enter the URI sans protocol

aaronpk commented 6 years ago

Yep you can solve that yourself! Right now you are serving two copies of your site, one at http://jackjamieson.net/ and one at https://jackjamieson.net/. If you set your http site to redirect to https, then Monocle will see that redirect when you log in and it'll work fine.

jackjamieson2 commented 6 years ago

Sweet! Thanks @aaronpk

aaronpk commented 5 years ago

@jernst I'm guessing this is related to an IndieAuth WordPress bug. Can you update to the latest IndieAuth plugin? There are some more helpful error reporting tools in it now.

jernst commented 5 years ago

I don't have the setup right now that I would need to reproduce this or try things out with.