Skip to content
Back

Redirect URL sends HTTP instead of HTTPS when using OAuth

  • 0
  • Self Hosted
  • Auth
  • Flutter
THE-E
22 Jun, 2025, 12:51

I am not sure since when this issue is present, but my Google and Apple redirect URI are no longer pointing to the HTTPS redirect URI when I try to use OAuth.

My setup is hosted in Digital Ocean as a Appwrite droplet (VM).

Currently, I get the error:

I have checked my .env of next to my docker-compose.yml and it contains:

TypeScript
_APP_OPTIONS_FORCE_HTTPS=disabled

Changing the variable _APP_OPTIONS_FORCE_HTTPS to enabled breaks the complete appwrite backend (unreachable). With the message:

TypeScript

The page isn’t redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    This problem can sometimes be caused by disabling or refusing to accept cookies.

When adding the http backend to google OAuth authorized redirect URIs the Login works fine. But this shouldn't be the solution, should it?

The issue is same for Apple Sign in. But in this case no redirect URI with the HTTP protocol is accepted instead only HTTPS is allowed (therefore the Apple Sign in is broken without a 'workaround').

The appwrite backend Web UI etc. is only reachable using HTTPS and cannot be reached using HTTP protocol (so there is an valid an working certificate for my domain/sub domain)

I would want appwrite to set the redirect URI to be HTTPS instead of HTTP. But I am unable to find the right setting to do. Can someone help me out?

TL;DR
Developers experiencing an issue with OAuth redirect URLs sending HTTP instead of HTTPS. Attempted solutions include changing the `_APP_OPTIONS_FORCE_HTTPS` variable, but this causes further issues. Google OAuth works with HTTP, Apple Sign in only accepts HTTPS. An incorrect redirect loop occurs when changing the setting to enable HTTPS. A solution is not yet available.
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