Skip to content
Back

OAuth with custom domain doesn't work after migration

  • 0
  • General
  • Auth
  • Cloud
Venom
22 Apr, 2025, 08:21

Even though I setup perfectly in Appwrite, when I tried to login via OAuth, browser refuses to enter and says 'ERR_CERT_COMMON_NAME_INVALID'. I think it's problem of certificate, how can I solve?

When I tried to get inside, I got these errors:

TypeScript
Failed to load resource: the server responded with a status of 421 ()
Requested host does not match any Subject Alternative Names (SANs) on TLS certificate [93396682cdb49dd1a04e4a2daeb09cc2b265b12b7a850491a87542ab6cfa8df8] in use with this connection.

Visit https://www.fastly.com/documentation/guides/concepts/errors/#routing-errors for more information.

In fastly docs:

TypeScript
421    Misdirected Request    Indicates a mismatch between the hostname provided in the TLS handshake (e.g., in the SAN entries in the TLS certificate) and the requested hostname in the HTTP Host header. This may happen if you are attempting to do domain fronting which is not supported by Fastly by default. Consider setting a host header override on the backend.

But I have no idea what should I do in my side

TL;DR
Issue: OAuth login failing with 'ERR_CERT_COMMON_NAME_INVALID' after migration, likely due to certificate problem. Solution: The error message suggests a mismatch between the hostname in the TLS certificate and the requested hostname in the HTTP Host header. Consider setting a host header override on the backend to resolve the issue.
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