Back

[SOLVED} Google Auth (redirect url mismatch)

  • 0
  • Flutter
  • Android
  • Accounts
  • Apple
  • Users
SpencerSama
23 Oct, 2023, 14:18

Hi all, I have a problem with the Google Auth provider. I have followed the Appwrite guidelines but I get this error when I try to authenticate.

TL;DR
User encountered a redirect URL mismatch error while trying to authenticate with Google Auth provider on Appwrite. Issue was resolved by adding both http and https URIs to the redirect URL. Hostname should also be checked for any mismatch in test environment and Google Developer Console.
Aditya Oberai
23 Oct, 2023, 15:01

@SpencerSama can you show exactly what redirect URI is added to your Google Console?

Aditya Oberai
23 Oct, 2023, 15:06

Also, if you're self-hosting, please make sure that your hostname matches in your test environment and on the Google Developer Console

localhost and 127.0.0.1 can cause a mismatch too, even though they do point to the same application

SpencerSama
23 Oct, 2023, 16:28

They are the same

Aditya Oberai
23 Oct, 2023, 16:29

Can you share a screenshot once?

SpencerSama
23 Oct, 2023, 16:30

Sure, Appwrite or google cloud?

Aditya Oberai
23 Oct, 2023, 16:31

Both, if that's okay?

SpencerSama
23 Oct, 2023, 16:31

Sure

SpencerSama
23 Oct, 2023, 16:36

Voila

SpencerSama
23 Oct, 2023, 16:56

Problem solved. In fact, I had to add my http and https uri.

SpencerSama
23 Oct, 2023, 16:57

Thanks for your help πŸ™

Aditya Oberai
23 Oct, 2023, 18:11

Ah perfect!

Aditya Oberai
23 Oct, 2023, 18:11

[SOLVED} Google Auth (redirect url mismatch)

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