Back

`redirect_uri` returns http instead of https for github OAuth

  • 1
  • Self Hosted
  • Auth
PandaDEV
21 Jan, 2025, 01:23

Im self-hosting appwrite using docker compose and then exposing with cloudflared/zero trust tunnel system I tried solutions from other support threads but none of them seem to be working. This includes the env variable _APP_OPTIONS_FORCE_HTTPS when I enabled that my whole instance just takes ages to load anything (basically unusable).

Could it be a issue that im not exposing it over 80 or 443 but instead changed it to port 8003:

TypeScript
traefik:
    image: traefik:2.11
    container_name: appwrite-traefik
    <<: *x-logging
    command:
      - --providers.file.directory=/storage/config
      - --providers.file.watch=true
      - --providers.docker=true
      - --providers.docker.exposedByDefault=false
      - --providers.docker.constraints=Label(`traefik.constraint-label-stack`,`appwrite`)
      - --entrypoints.appwrite_web.address=:80
    restart: unless-stopped
    ports:
      - 8003:80
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - appwrite-config:/storage/config:ro
      - appwrite-certificates:/storage/certificates:ro
    depends_on:
      - appwrite
    networks:
      - gateway
      - appwrite
TL;DR
The `redirect_uri` is returning http instead of https for Github OAuth due to the configuration for `traefik` in the docker compose file, specifically, the port being set to 8003 instead of the default 80 or 443. To resolve this, change the port back to the default 80 or 443 and ensure that the `traefik` configuration includes the correct HTTPS settings. Additionally, make sure that the zero trust tunnel system is properly configured to handle HTTPS traffic.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more