Skip to content
Back

Google login error: {"message":"Invalid `success` param: URL host must be one of: localhost, appwrit

  • 0
  • Auth
  • Web
  • Cloud
GomaPerrona
4 May, 2025, 02:37

hi, im trying to use google login with account.createOAuth2Session( 'google', 'profevardilla.pages.dev', 'profevardilla.pages.dev' );, before i haved localhost instead of profevardilla and it worked, but know that i added that, when i click on login button and this functions execute, it give me the error: {"message":"Invalid success param: URL host must be one of: localhost, appwrite.io, *.appwrite.io, cloud.appwrite.io","code":400,"type":"general_argument_invalid","version":"1.6.2"}, i have added in the google oauth client the profevardilla trusted domain, but the error is the same, how can i fix it?

TL;DR
Developers using `account.createOAuth2Session` encountered an error "Invalid `success` param: URL host must be one of: localhost, appwrit." This issue arose when switching from localhost to a custom domain. To resolve, ensure the custom domain is correctly added and trusted in the Google OAuth client.
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