
Hey, I'm running Appwrite and my Flutter web app (running live for debugging using flutter run
) behind an NGINX reverse proxy and it seems that due to the reverse proxy handling the HTTPS traffic and decrypting it for the apps, when I try to sign in using createOAuth2Session
, it passes an unsecured callback URL to the provider, meaning I cannot continue signing in. This is probably the same issue as https://github.com/appwrite/appwrite/issues/5545 but I didn't find any solution there. Is there anything I can do to force it to pass HTTPS?

If you use default https port I think it will use https

As suggested in the issue: https://github.com/appwrite/appwrite/issues/5545#issuecomment-1553276914

I didn't really understand what proxying to Appwrite using HTTPS
meant

Your proxy_pass directive should include https

Oh ok, am I supposed to change some setting related to HTTPS in appwrite, because now every page returns 404 page not found

Found only something about _APP_OPTIONS_FORCE_HTTPS
, but it says it only works when the app is using 80
and 443
ports, which I am not

No nothing in Appwrite. What ports is Appwrite running on? What exactly is your proxy pass directive?

Yeah I'm just stupid, I forgot to switch the port to the https port when I was changing http to https in the proxy_pass 🤦♂️

Ok yeah it all works now, thank you very much 🙏

[SOLVED] Unsecure callback sent to OAuth provider due to reverse proxy
Recommended threads
- Error response from daemon: driver faile...
on endpoint appwrite-traefik (00bbc10e5875d0c367d8975c6abc946a77b7ec201a64a825399add44fb34ebb4): failed to bind port 0.0.0.0:80/tcp: Error starting userland pro...
- "Memberships privacy" setting in 1.7.4
Hi everyone, I'm experiencing an issue with a clean self-hosted installation of Appwrite version 1.7.4. I previously used version 1.6.1, and if I remember corre...
- Issue with Appwrite Function Execution –...
Hi all, I'm encountering an issue when calling an Appwrite function from my Flutter app. **Environment:** ```Flutter SDK: 3.27.3 Appwrite Flutter SDK: 16.1.0```...
