Back

[SOLVED] Error 400: redirect_uri_mismatch

  • 0
  • Android
  • Cloud
D5
25 May, 2023, 09:56

Make sure too you added the corresponding code into your android manifest file: https://appwrite.io/docs/getting-started-for-android#OAuthCallback

TL;DR
The user had an "Error 400: redirect_uri_mismatch" issue. They were able to solve it by manually adding a 'success' parameter to a specific redirect URL for the web platform. They then asked how to determine the platform (Android or web) to pass the success parameter. It was suggested to handle that manually for the web. The user encountered a problem with the redirect URL not working on the web platform, even after adding it correctly. It was then pointed out that they had not added a specific URL to the AndroidManifest.xml file, and they were provided with a link to the documentation on how to fix it.
Sagar🌊
25 May, 2023, 09:56

For the article, i will share once it's done.

D5
25 May, 2023, 09:57

I mean the part where it's mentioned to setup as Android

Sagar🌊
25 May, 2023, 10:00

This is the docs that Appwrite suggests when we go to Google OAuth2 Settings

Hoàng Quốc An
25 May, 2023, 10:03

when i start setup Oauth2, appwrite auto fill with my account, is it necessary? i think user can misread about it

D5
25 May, 2023, 10:05

It's being autofilled by your browser, not appwrite

Hoàng Quốc An
25 May, 2023, 10:05

ah! sorry for that

D5
25 May, 2023, 10:05

You need to put in app ID and secret what you can find in the Google Cloud Panel after setting up that

Hoàng Quốc An
25 May, 2023, 10:27

I can sign in but still get issue about redirect

Hoàng Quốc An
25 May, 2023, 10:27
Hoàng Quốc An
25 May, 2023, 10:28

Where can i find docs to fix it?

D5
25 May, 2023, 12:04

https://appwrite.io/docs/getting-started-for-android#OAuthCallback

This was not added to your AndroidManifest.xml file

Hoàng Quốc An
25 May, 2023, 12:05

Ah. I have been completed! Tks very much!

D5
25 May, 2023, 12:08

If you added and It and stills not working make sure its correctly added where it should be and you have added correctly your project id into the corresponding field

Hoàng Quốc An
25 May, 2023, 15:03

Sorry for disturbing again! I have prob with flutter web platform about missing redirect url, i also do that but it not work on web

D5
25 May, 2023, 15:40

For web you need to handle that manually

Hoàng Quốc An
25 May, 2023, 16:49

if you have any example, please help me with it!

Hoàng Quốc An
25 May, 2023, 18:08

i could manually with 'success' parameter to specific redirect Url for Web. Now new problem is how to know if platform is android or web to pass success parameter. is it alright?

Hoàng Quốc An
26 May, 2023, 15:58

wow! this very helpful, tks a lot!

Drake
26 May, 2023, 16:01

In the future, it would be best to create a separate post in <#1072905050399191082>

Drake
26 May, 2023, 16:01

@Sagar🌊, is your problem resolved?

Sagar🌊
26 May, 2023, 16:08

Yes 🚀

Drake
26 May, 2023, 16:11

[SOLVED] Error 400: redirect_uri_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