Skip to content
Back

OAuth2 Error: invalid success param url host must be one of localhost, *.appwrite.io, cloud.appwrite

  • 0
  • React Native
  • Auth
  • Functions
  • Cloud
Abraham01
24 Apr, 2025, 21:25

Hi everyone! I'm trying to implement Google OAuth2 login in a React Native app (using the Android simulator) with Appwrite Cloud, and I'm getting the following error when opening the auth URL

So i try to: To solve this, I created a custom Appwrite Function to act as a redirect handler. This function receives the userId and secret as payload and returns a 302 redirect to my app’s custom URL scheme

Despite this setup, I'm still getting the same error from Appwrite about the success URL. Am I missing a configuration step or is there a better way to handle OAuth2 in a React Native app using a custom URL scheme?

Thanks in advance!

TL;DR
Error message: OAuth2 error - success param URL host must be one of localhost, *.appwrite.io, cloud.appwrite Developers are working on React Native + OAuth2 improvements. To fix this issue, ensure to add your function domain as a web platform for your project. Developer is trying to implement Google OAuth2 login in a React Native app using Appwrite Cloud but facing an error with the success URL host restrictions. They attempted a custom Appwrite Function as a redirect handler but the issue persists. Asking for help on handling OAuth2 in React Native with a custom URL scheme.
Steven
24 Apr, 2025, 21:30

we're working on improvements to React Native + OAuth2.

if you really want to go down this route of yours, make sure to add your function domain as a web platform for your project

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