-
Notifications
You must be signed in to change notification settings - Fork 4.4k
🐛 Bug Report: OAuth Login invalid success #6322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I should add that if I hardcode the testing.domain.com in hostname field, it works but I cannot use a wildcard sub domain. |
I think this issue is common with all the OAuth services. |
No, the issue was not there in v1.3.7 and v1.3.8. I could use wildcard sub domain. It has started happening when I upgraded to v1.4.1 |
@gaurav-chandra, thanks for raising this issue! 🙏🏼
Are you sure you didn't have an additional web platform before? I'm looking at the validation between 1.3.8 and 1.4.3 and they seem to be the same. I also tried testing on 1.3.8, but got the same error: That said, I'll bring this up to the team. |
hey @stnguyen90 thanks for taking this up. Now that you mention it, I am wrong about v1.3.8. I realised that I was testing on localhost and it always works on localhost. |
I'm still in discussion with the team about this, but the crux of the problem is the validation that's done on the success URL expects an exact match. However, the validation for CORS, allows wildcards. |
Great that this was discussed and closed. However, noone seem to talk about how it was solved so that others don't have the same issue. |
i dont understand how tis issue is closed, did anybody find solution to this???? i have the same problem: Invalid |
same error, self-host v1.6 |
Solution: If the above solution doesn't work then try this custom solution, remove success parameter. Code for my flutter app, if it helps anyone:
|
👟 Reproduction steps
sdk.createOAuth2Session('google', success_url, error_url)
👍 Expected behavior
it should login and have success as the hostname is either * or *.domain.com
👎 Actual Behavior
appwrite shows an error:

🎲 Appwrite version
Version 1.4.x
💻 Operating system
Linux
🧱 Your Environment
ubuntu v20 and appwrite v1.4.3
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: