-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OAuth 2 MUST utilize https Error #1
Comments
Thanks for taking your time in looking into it. The current configuration is:
|
Huh, looking at the traceback, it appears this error is coming from the FitTrackee app itself (not the strava-to-fittrackee) code, since it's an error in the Flask app. If was coming from strava-to-fittrackee, I'd expect to see strava-to-fittrackee is designed (maybe I should have made this more clear in the README) to be run independently from FitTrackee (as in, not in the same Python environment). I have mine in a separate python virtualenv. Is there any chance you installed this in the same environment, and maybe that caused an issue? (just grasping for straws, not sure that would actually be a problem). The only other debugging I can think to do would be to install this extension: https://rcfed.com/Browser/Tracer and look at the content of the requests/responses and figure out why something is using http:// rather than https:// (which is what the error sounds like). Here are the two requests that I see on my browser using that extension: The top one is the one going TO FitTrackee that is made when you copy/paste or click the link presented in the terminal. The second is the one FROM FitTrackee to whatever you put as the callback URL (in my case https://192.X.X.X/callback) in the app definition, after you click the "Authorize" button. My guess is that there's something wrong with generating that request in your case. In my case, the |
This is the other part that makes me wonder if it's the source of the issue. As far as FitTrackee is concerned, the app is running without SSL, and the OAuth specification states that it must use SSL. Looking into this, I see some suggestions in some other issues about setting an environment variable that disables this check (although that doesn't sound super satisfying, if you're okay with that security stance, it might be a solution):
Paging @SamR1, since this actually sounds like a FitTrackee issue that any third-party app would face. Have you seen this issue registering third-party apps with FitTrackee behind a reverse proxy for SSL? |
I also saw this in the FitTrackee docs for third party apps (https://samr1.github.io/FitTrackee/apps.html#resources). Not sure if it would help: I ignored it originally as I'm not running behind a proxy. It looks like this header is for forwarding the original protocol (i.e. http or https). That syntax is for nginx, but you could try setting your Apache config to do the same: https://webmasters.stackexchange.com/a/107445 |
This indeed helped, but only partially.
to my Apache config, and it worked, but I encountered another error... |
All good now. It took me a while to get back to it, as I lost my laptop and a few other things have been happening, but I can confirm now that re-pairing all works as expected. |
I am running the FitTrackee in Docker behind Apache reverse proxy and the Strava authorization side works perfectly fine, but when I am trying to "Authorize" the Strava app within the FitTrackee I keep getting this error:
authlib.oauth2.rfc6749.errors.InsecureTransportError: insecure_transport: OAuth 2 MUST utilize https.
I have tried to manually edit the generated urls to point to my FitTrackee instance from "self.host", but it did not make any difference.
The text was updated successfully, but these errors were encountered: