
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
- Need help setting up this error is showi...
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy. If you're the app developer, register the redirect URI in the Google Cl...
- Appwrite stopped working, I can't authen...
I'm having an issue with Appwrite. It was working fine just a while ago, but suddenly it stopped working for me and can't authenticate accounts. I even went bac...
- Fail to receive the verification email a...
I added my email address to prevent it from showing "appwrite," but now I'm not receiving emails for verification or password resets. The function appears to be...
