mariusor / brutalinks

Link aggregator inspired by (old)reddit using ActivityPub federation. (mirror repository)
https://brutalinks.tech
MIT License
261 stars 12 forks source link

Improve .env.example and readme #34

Closed vcavallo closed 4 years ago

vcavallo commented 4 years ago

Hello,

The comments in .env.example are good, but slightly confusing. Especially as it relates to the connection to fedbox. It's unclear how to wire the two together. Any chance these could be made clearer?

I'm happy to submit a PR to improve once I understand it fully myself - but so far I can't get it working.

mariusor commented 4 years ago

Basically go-littr is just a frontend for a fedbox service backend.

All it does is to load information from fedbox and present it in a "link aggregator" form.

So, the main ingredient is having fedbox running and generating OAuth2 application credentials for the go-littr instance.

However fedbox is currently relying on the fact that it's behind a proxy, because it uses the hostname it's being accessed as for storage purposes. This means that a fedbox server listening on "localhost:4000" needs to have an nginx in front of it receiving requests as "fedbox.local".

When this step is working and you can navigate around fedbox.local, you can plug the address to your go-littr config together with the OAuth credentials. That should be it.

vcavallo commented 4 years ago

The nginx and oauth part is something I had not not considered. I'll report back if I still can't get it working :) thanks

jhert0 commented 4 years ago

Hi, I'm also having issues with the getting littr and fedbox to talk to each other correctly. I'm running both littr and fedbox behind nginx.

Originally I was getting a couple of errors, the first one says "error processing oauth2 request: the request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed". The second error I get is "client authentication not sent".

I'm now getting this:

time="2020-07-04T03:23:56Z" level=error msg="http://localhost/objects?context=-&type=Article&type=Note&type=Link&type=Page&type=Document&type=Video&type=Audio: Unable to load from the AP end point: invalid status 404"
time="2020-07-04T03:23:56Z" level=error msg="http://localhost/objects?type=Article&type=Note&type=Link&type=Page&type=Document&type=Video&type=Audio: Unable to load from the AP end point: invalid status 404"

for OAUTH2_KEY I have the client id I got from fedbox and for OAUTH2_SECRET I have the password I put in when I created the admin actor.

mariusor commented 4 years ago

@endoffile78 the OAUTH2_KEY and _SECRET should come from the command to add an OAuth2 client, it's the last command in the process.

Please use separate tickets for separate issues though. :)

mariusor commented 4 years ago

@vcavallo any updates on this?

@endoffile78 did my explanation above help you, or should we move the discussion to a different issue?

jhert0 commented 4 years ago

Sorry, I've been kind of busy and just now saw this. I haven't got fedbox and littr to work together. I'll open another issue.