mconway / firefly-app

Mobile application for Firefly iii
GNU General Public License v3.0
62 stars 8 forks source link

Bug?: Trying to authorize the app gives me that the requested URL is not found #12

Closed TobiasDev closed 6 years ago

TobiasDev commented 6 years ago

I'm trying to set-up a link to my hosted Firefly instance. However, I get as far as pressing the green authorize button, but then it says: Not Found The requested URL /oath/authorize was not found on this server.

So I guess something is wrong in my callback link. I am hosting this through a provider with a personal domain, do I need to somehow makes this link different then? Rather than saying localhost I mean.

mconway commented 6 years ago

Can you confirm it's saying the URL is /oath/authorize? That would be a typo, but within the app itself. If you could attach a screenshot of both the settings page in the app, as well as the settings within Firefly for your oauth client, that would help.

TobiasDev commented 6 years ago

https://cloud.postnow.eu/index.php/s/abzER4WrFbCw52P

I hope those help

mconway commented 6 years ago

Taking a bit of a guess here, but I'm betting that because you are using a subdirectory (/public), the url the app is calling is actually https://yoururl.com/oauth/authorize.

Do you have access to the logs on the web server? could you watch the error logs and see the full url being called?

TobiasDev commented 6 years ago

Hmm. Yeah, I should but sadly not until Monday. :( Is there anything I can add to the in one of the links? In the app or the Oauth link? Just to see if that fixes it. Otherwise I can check the log on Monday.

mconway commented 6 years ago

Everything looks OK. If you were interested in giving me access to your instance with a user account, I could poke around (doesn't have to be your main account)

Get Outlook for Androidhttps://aka.ms/ghei36


From: Tobias Johansson notifications@github.com Sent: Friday, September 21, 2018 11:42:56 PM To: mconway/firefly-app Cc: Mike Conway; Comment Subject: Re: [mconway/firefly-app] Bug?: Trying to authorize the app gives me that the requested URL is not found (#12)

Hmm. Yeah, I should but sadly not until Monday. :( Is there anything I can add to the in one of the links? In the app or the Oauth link? Just to see if that fixes it. Otherwise I can check the log on Monday.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/mconway/firefly-app/issues/12#issuecomment-423721599, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAZHctOLs-H1Zvr-g8JG_0j_H-Z1tJ8kks5uddvwgaJpZM4Wzn25.

TobiasDev commented 6 years ago

Hmm. For sure. I created a test account for some friends to try (I will delete in a week or so), that you can use if that helps. Thanks for helping me out so much with this.

Name: Pass:

mconway commented 6 years ago

Thanks! that helped. I was able to confirm my suspicions. when you hit "save", it's trying to hit this URL:

Request URL: https://fin.postnow.eu/oauth/authorize?client_id=4&redirect_uri=http%3A%2F%2Flocalhost%2Fcallback&scope=&response_type=code&state=

I'll consider this a bug and I'll make sure it's fixed in the next release (hoping to post the update in the next few days if not this weekend).

A workaround in the mean time would be to update the vhost on your webserver to redirect /oauth back to /public/oauth. But that's hacky :)

mconway commented 6 years ago

Interestingly enough, this is actually coded into the form used to authenticate from the Firefly-iii side. If you try the URL above from a web browser (it should still work?) you will get the same result.

I've filed a bug with James Cole, the developer of Firefly-III. You can see that issue here: https://github.com/firefly-iii/firefly-iii/issues/1709

TobiasDev commented 6 years ago

Ah. Super, thanks! Then I will wait for the bug to be fixed. :) Thanks for looking into it. First time I'm trying to self-host anything, so thought it was something I did wrong.