Back

Google OAuth Login invalid success

  • 0
  • Web
gaurav_ch
7 Sep, 2023, 06:09

I have been successful in getting the google oauth to work on my localhost but when I deployed to my testing server, the back url given creates an error in appwrite console.

I have 3 environments:

  1. DEV: https://localhost
  2. Testing: https://testing.atomtalkpvtltd.com
  3. Prod: https://app.atomtalkpvtltd.com

I am having problem in testing and prod environment. The appwrite platform has both testing and prod urls in hostname. I have experimented with wild card also.

But even then, I am getting a 400 ERROR that "Invalid success param: URL host must be one of: localhost, backend.atomtalkpvtltd.com, app.atomtalkpvtltd.com, testing.atomtalkpvtltd.com"

So, what needs to be done? I am on v1.4.1 and self hosting

TL;DR
Title: Google OAuth Login invalid success Messages: User is experiencing an issue with Google OAuth login. They had been able to login successfully until recently, but now when they try to login from another device, they receive an error message. The issue seems to be related to validating the success URL differently from validating origins. The user is on self-hosting v1.4.1 and has attempted to use wildcard subdomains, but it resulted in an error. Another user suggests creating a new web platform, as multiple hostnames cannot be used. Solution: Create a new web platform and ensure the success URL matches the allowed hostnames.
Drake
7 Sep, 2023, 17:54

you can't put multiple hostnames. create another web platform

gaurav_ch
12 Sep, 2023, 12:27

what about a wild card like * or *.atomtalkpvtltd.com ?

Binyamin
12 Sep, 2023, 14:44

That you can do

Binyamin
12 Sep, 2023, 14:45

It's best to go with *.atomtalkpvtltd.com if it's your domain as of security concerns.

Drake
12 Sep, 2023, 17:27

Google OAuth Login back url creates an error in appwrite

Drake
12 Sep, 2023, 17:27

Google OAuth Login invalid success

gaurav_ch
13 Sep, 2023, 05:03

thanks. I will try and see the response. Will update soon.

ideclon
13 Sep, 2023, 11:57

I don’t think Platforms support wildcard subdomains

Binyamin
13 Sep, 2023, 14:21

Check here

gaurav_ch
21 Sep, 2023, 11:16

so, I finally got around to it and *.atomtalkpvtltd.com does not work. Check the screenshot but if I add the full subdomain: testing.atomtalkpvtltd.com , then it works.

gaurav_ch
21 Sep, 2023, 11:16

I am on self hosting v1.4.1

Drake
22 Sep, 2023, 18:03

interesting...the reason why is because we validate this success url differently compared to how we validate origins...it might be worth it creating an issue for this

prakashtech
24 Sep, 2023, 13:52

for me it was working fine till yesterday, suddenly when I try to login from another device I saw this message

Drake
24 Sep, 2023, 17:05

Please create a new <#1072905050399191082> post instead of posting in an existing thread

gaurav_ch
25 Sep, 2023, 08:17

done

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