mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.15k stars 2.91k forks source link

FXIOS-408 ⁃ Custom Sync Token Server: Invalid OAuth parameter #6535

Closed marank closed 3 years ago

marank commented 4 years ago

Steps to reproduce

  1. Enter a custom Sync Token Server in Advanced Sync Settings
  2. Try to log in to Sync

Expected behavior

Successfull login

Actual behavior

There's no login screen appearing, instead I get the error message Invalid OAuth parameter: redirect_uri

Device & build information

┆Issue is synchronized with this Jira Task

mmnaseri commented 4 years ago

How is this a P3? This feature is basically broken, meaning I cannot have my data synced to my phone. That's the most important vector of my day-to-day use and it is completely broken.

Balooforever commented 4 years ago

+1, broken after FF 25 ...

mmnaseri commented 4 years ago

This was originally tracked in #5006, and was marked as fixed. I don't see this working anymore. I think that this is a regression past dcd1ff71619922aafbf9547e99ca6f65a563bb52. I will also cross-post in the other bug so that we get more traction and visibility to the people who originally reported and followed up on that issue.

sprangen commented 4 years ago

+1 still broken in FF27...

andromedi4 commented 4 years ago

+1 still broken FF28 It’s very sad story...

nook24 commented 4 years ago

Three month passed without a response from Mozilla. I think due to the latest budget cuts we never will get a fix for this. So here we are 2020 and we have to send emails to ourselves to avoid Google Chrome.

drixter commented 4 years ago

I think that's finally is working, first one update sync server to new one, because there is a new version, then in firefox use custom setting, provide your own syncserver address but for the rest provide proper firefox ones, seems to be working, I didn't check it very deep but looks promising.

Thlb commented 4 years ago

@drixter Hi! Can you make a screenshot of the settings you set to get it working?

I’ve tried but I still have the invalid Oauth parameter error.

nook24 commented 4 years ago

@drixter Which Sync server are you using? I'm still going with Python version: https://github.com/mozilla-services/syncserver Should I switch to the Rust version https://github.com/mozilla-services/syncstorage-rs ?

drixter commented 4 years ago

Hi,

I'm using python one, but last time there was update, so even it's needed for normal Firefox on PC.

On mobile: obraz On Firefox on PC: identify.sync.tokenserver.uri: https://fxa.e-utp.net/token/1.0/sync/1.5

Looking the logs, both Firefox connect to syncserver and transfer some data.

of course, please instead fxa.e-utp.net your server, but you can also try with mine for test.

Thlb commented 4 years ago

@drixter it seems filling the « custom FxA content server » field did the trick for me ! Thank you so much! After 4 month I can finally connect my device...

I didn’t check all the features too but seems promising

nook24 commented 4 years ago

@drixter Thanks for posting your settings. This was the missing hint!

I updated my Python Sync Server to the latest master branch.

So for Firefox Desktop I use identity.sync.tokenserver.uri=https://sync.nook24.eu/token/1.0/sync/1.5 On Firefox iOS have to use https://sync.nook24.eu/token/ without 1.0/sync/1.5

I also set FxA Server to https://accounts.firefox.com but I don't know if it is really necessary.

chkpnt commented 4 years ago

Yeah, thanks for the hints! Now it's working for me, too :-)

And I can confirm: Without setting the FxA Server to https://accounts.firefox.com I get the redirect_uri error.

And as suggested by @drixter and @nook24 it's important to note that the token-server url must not include 1.0/sync/1.5, otherwise you get something like this in your server logs:

172.19.0.3 - - [06/Sep/2020:13:36:58 +0200] "GET /ffsync/token/1.0/sync/1.5/1.0/sync/1.5 HTTP/1.1" 404 1 "-" "Firefox-iOS-FxA/28.1b19225 (iPhone; iPhone OS 13.7) (Firefox)"
gruzilla commented 4 years ago

I can also confirm, that

on Firefox Desktop this works: identity.sync.tokenserver.uri=https://xxxxxxxxxxx/token/1.0/sync/1.5

On Firefox iOS this works: custom fxa content server: https://accounts.firefox.com (redirect error without configuring it) custom sync token server: https://xxxxxxxxxxx/token without 1.0/sync/1.5 (had to restart ipad and firefox so that the new setting was accepted)

Thlb commented 4 years ago

After a lot of tests, I can confirm that everything is fully working :

BobWs commented 4 years ago

Finally it is working! Thanks for sharing

hesne commented 3 years ago

That seems to work, but as last sync date I've 2020-05-22. Also after pressing the sync button. Looks like that all newer bookmakrs and passwords are not syncing.

ryanburnette commented 3 years ago

Mine is also not working with iOS Firefox. Enabled debug mode on the server and I can see it getting 401 response when trying to validate the token. Can't troubleshoot further.

JBFUK commented 3 years ago

Working here. Now if only we could get the Mobile Bookmarks folder synced to desktops that would be great.