
My appwrite hosted at https://appwrite-domain.com/ and front-end app hosted at https://app-domain.com/, so both of them use "https". Front-end app use Web SDK and call "createOAuth2Session" with given provider, when I redirected to provider urls of Google or Facebook in "redirect_uri" param I see http://appwrite-domain.com/callback instead of "https".
As described above I used in both "https", so why it passed "http" instead. Can someone explain how Appwrite decide which protocol should be passed into this (attached screenshot from the code source).

P.S. Maybe the reason with "Traefik" which used by Appwrite, before we have a problem with ports, because we need to host both front-end and appwrite with the 80/443 on the same server.
So for that we disabled traefik SSL generation, and transfer hosting to nginx and generate certificates for both of them here.

Can you share your Nginx config, I think you'll need to change it to be also http.


Good Try to change it so the internal revers proxy will go to an https one
location / {
proxy_pass https://appwrite;
...
}

@Binyamin, thanks for answer, I'm haven't direct access to server for changing this configuration, so I will comeback with answer if it helps me later.

Issue was resolved. For any one who stack with problem of nginx proxy to traefik (appwrite built-in), leave a description of problem:
It was in the wrong IP address of host nginx proxy in config of traefik.
services: traefik: image: traefik:2.7 container_name: appwrite-traefik <<: *x-logging command: - --entrypoints.appwrite_web.forwardedHeaders.trustedIPs=172.18.0.1 (here was missmatch)
This setting tells Traefik to trust X-Forwarded-* headers from nginx where IP address and Proto of real incoming connection is stored.

[SOLVED] Redirect URI passed as HTTP not HTTPS via OAuth2
Recommended threads
- ❗[Help] Function stuck in "waiting" stat...
Hi Appwrite team 👋 I'm trying to contribute to Appwrite and followed the official setup instructions from the CONTRIBUTING.md guide to run the platform locall...
- Stuck in "deleting"
my parent element have relationship that doesnt exist and its stuck in "deleting", i cant delete it gives me error: Collection with the requested ID could not b...
- Help with 409 Error on Relationship Setu...
I ran into a 409 document_already_exists issue. with AppWrite so I tried to debug. Here's what I've set up: Collection A has 3 attributes and a two-way 1-to-m...
