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
- Custom emails
What happen if I use a third party email provider to customize my emails and my plan run out of emails/month? Appwrite emails are used as fallback sending emai...
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...
- Can't login or deploy functions in Appwr...
Hello, since i updatet to the appwrite cli 6.1.0 i can't login or deploy functions with the cli. When i call the command: "appwrite get account --verbose" i ge...