
I have enabled google oauth2 provider in auth setting and configured it correctly. But when I click the button to start createOauth2Session with google I got the error message in google page as "redirect_uri_mismatch", and the detail information for developer is: require me to set up redirect_uri=http://api..., but I had configured the HTTPS redirect URI in google console for this oauth2 client ID. And My Appwrite console is also HTTPS and configured HTTPS endpoint in my app. Every step is correct, but I doubt that the createOauth2Session method used HTTP to initiate uri jumps. An important situation is that my Appwrite console uses nginx proxy to set up HTTPS. Is it related to this?

You need to make sure to proxy pass to Appwrite using https

Thanks Steven. But how to impl this process. My nginx proxy configures like this:
location / {
proxy_pass http://127.0.0.1:2023;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
add_header X-Cache $upstream_cache_status;
proxy_set_header X-Host $host:$server_port;
proxy_set_header X-Scheme $scheme;
proxy_connect_timeout 30s;
proxy_read_timeout 86400s;
proxy_send_timeout 30s;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

Proxy_pass https://127.0.0.1:<https port>

I had configured 2023 as 80, 2024 as 443 in docker-compose.yml file, but after I changed proxy pass to http://127.0.0.1:2024 , the console website become 404 page not found. 😦
services:
traefik:
image: traefik:2.7
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
- --entrypoints.appwrite_websecure.address=:443
restart: unless-stopped
ports:
- 2023:80
- 2024:443
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

It should be https
Recommended threads
- Cannot access my Appwrite database on th...
Hello guys, I am currently developing a web app and using appwrite for authentication, database, storage and messaging. It was working well but since yesterday...
- Nuxt Middleware Support
So I'm trying to protect some routes so that the user is redirected back to the login screen should they not have an active session. However, I'm stuck in a lo...
- Sites Problem
Hi, I keep getting this problem when deploying my site. I have already made sure the site is active which it is. It even shows the preview of my site but when ...
