ailinykh / ImgurBar

macOS image uploader for imgur.com
8 stars 0 forks source link

[BUG] Imgur account authorization fails #2

Open jslpc opened 1 year ago

jslpc commented 1 year ago

When building and running ImgurBar, everything launches perfectly. However, trying to login via the preference pane results in the following error from Imgur.com:

The information you sent wasn't quite correct. Please return to the place that sent you to this page and try again.

The information you sent wasn't quite correct. Please return to the place that sent you to this page and try again.

I managed to fix this by editing line 48 in AppDelegate.swift to not replace the URL with "FAKE_CLIENT_ID", but I don't really know Swift so I'm not sure how to fix this from happening.

I also ran into a callback-url error while logging in, as instructions for that were not provided, but managed to fix it as well. The callback-url when registering the application on Imgur.com needs to be imgurbar://oauth-callback.

jslpc commented 1 year ago

Quick follow up on this: Even when logged into Imgur in ImageBar, all uploads are posted anonymously. Trying to trace down why right now but I'm relying on lots of google searches.

ailinykh commented 1 year ago

I managed to fix this by editing line 48 in AppDelegate.swift to not replace the URL with "FAKE_CLIENT_ID", but I don't really know Swift so I'm not sure how to fix this from happening.

Yes, there is an option, but the preferable way is to pass it via Environment variable. To do that, select Edit Scheme...

Screenshot 2023-08-15 at 20 29 13

choose Run in the sidebar menu and insert client_id as an Environment variable

Screenshot 2023-08-15 at 20 29 59

I also ran into a callback-url error while logging in, as instructions for that were not provided

Yep, my fault. I will add it to the readme as well

Even when logged into Imgur in ImageBar, all uploads are posted anonymously.

Correct. The feature is not completed yet. I hope #3 will fix this