Back

I get this error with Google Oath

  • 0
  • Self Hosted
  • Accounts
  • Web
ORIZON
4 Apr, 2023, 12:02

Please Check why I'm Getting this error while logging in.

TL;DR
User is experiencing an error with Google OAuth. They were previously able to use it but now it seems that wildcard validation is not being accepted. The suggestion is to create exact matching platforms instead of using a wildcard. User also has questions about the platform settings in Appwrite and shares their Google OAuth2 configs. The response points out a possible typo and suggests checking for specific scenarios of domains that are not working. User confirms that the error occurs when using a wildcard for other subdomains. Solution is provided to open Appwrite Console and add a web platform with the correct hostname to trust the success/failure URLs provided in `createOAuth2Session`.
Meldiron
4 Apr, 2023, 12:16

πŸ‘‹

When running createOAuth2Session, you provided success and failure URL. Those URLs needs to be trusted by Appwrite. To do that, open Appwrite Console (web UI), and add a web platform to your project (in overviews tab). There name is up to you, but hostname MUST be hostname that you use in those success/failure URL. Once added, the error shoudl be gone.

ORIZON
4 Apr, 2023, 12:22

It works if I specify explicitly the Subdomain. But wildcard is not working?

ORIZON
4 Apr, 2023, 12:25

Because I have other subdomains which needs access too

ORIZON
4 Apr, 2023, 12:27

When I use While card, Other subdomains work correctly but this Google Oauth showing that error

Meldiron
4 Apr, 2023, 12:32

can you please share specific scenario of domains which doesnt work? feel free to use example.com as a base.

ORIZON
4 Apr, 2023, 12:36

Okay. I got a test.example.com for the Main Website & boss.example.com for The Admin to control. When I use *.example.com, the test website works but when I use use boss.example.com, the Boss website works.

safwan
4 Apr, 2023, 12:58

i think you made a typo. please check πŸ˜…

ORIZON
4 Apr, 2023, 12:59

This is my Google Oath2 Configs

ORIZON
4 Apr, 2023, 13:00

App.example.com is appwrite backend and Boss.example.com is the website Admin will access from

safwan
4 Apr, 2023, 13:00

Okay what's the platform settings in Appwrite?

ORIZON
4 Apr, 2023, 13:03
ORIZON
4 Apr, 2023, 13:03

This one?

ORIZON
4 Apr, 2023, 13:38

Any idea whats the problem?

ORIZON
4 Apr, 2023, 18:53

Anybody there?

Drake
4 Apr, 2023, 19:28

looks like the oauth validation doesn't accept wildcard. it might be good to open an issue. for now, i suggest creating exact matching platforms instead of using wildcard

ORIZON
4 Apr, 2023, 20:07

No the thing is. It was working Yesterday

Drake
4 Apr, 2023, 20:08

i don't see how

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