Skip to content
Back

[SOLVED] redirect uri not working for OAuth with Expo

  • 0
  • Resolved
  • 2
  • Android
  • Auth
  • React Native
Vodi
2 Feb, 2026, 20:00

I'm following this tutorial: https://appwrite.io/blog/post/google-oauth-expo#create-an-expo-app but im using an android development build instead. When I run his app on his git repo, it works fine but when i try to integrate it into my own project, it gives me the error attached "Error 400 Invalid ⁨success⁩ param: Invalid URI. Register your new client as a new platform on your project console dashboard. general_argument_invalid"

I tried adding a new platform as scheme:// but this is not working

Please someone help I've been at it all day.

TL;DR
The user was facing issues with the redirect URI while using OAuth with Expo. Initially tried a solution from a GitHub thread but encountered a loading screen issue after successful login. They discovered the problem was due to the scheme not updating in the androidmanifest.xml file after changes in app.json, which was resolved by deleting and rebuilding the android folder.
3 Feb, 2026, 03:46

What's your app.json?

3 Feb, 2026, 03:46

And can you log what your passing for the success URL?

3 Feb, 2026, 10:37

Hi <@462046107556511744> thanks for the reply. Here is my app.json file: { "expo": { "name": "CapyCalm", "slug": "CapyCalm", "version": "1.0.0", "orientation": "portrait", "icon": "./assets/images/icon.png", "scheme": "CapyCalm", "userInterfaceStyle": "automatic", "newArchEnabled": true, "splash": { "image": "./assets/images/splash.png", "resizeMode": "contain", "backgroundColor": "#ffffff" }, "assetBundlePatterns": [ "**/" ], "ios": { "supportsTablet": true }, "android": { "edgeToEdgeEnabled": true, "adaptiveIcon": { "foregroundImage": "./assets/images/adaptive-icon.png", "backgroundColor": "#ffffff" }, "package": "com.vodi.CapyCalm", "intentFilters": [ { "action": "VIEW", "autoVerify": true, "data": [ { "scheme": "https", "host": ".webapp.io", "pathPrefix": "/records" } ], "category": [ "BROWSABLE", "DEFAULT" ] } ], "permissions": [ "android.permission.RECORD_AUDIO", "android.permission.MODIFY_AUDIO_SETTINGS" ] }, "web": { "bundler": "metro", "output": "static", "favicon": "./assets/images/favicon.png" }, "plugins": [ "expo-router", "expo-audio", "expo-web-browser" ], "experiments": { "typedRoutes": true }, "extra": { "router": {}, "eas": { // hidden for privacy } } } } And here is the exact success uri that i'm passing: CapyCalm://

3 Feb, 2026, 10:38

And I tried putting this as a platform in my console and it doesnt fix the issue

3 Feb, 2026, 11:44

https://github.com/appwrite/appwrite/issues/10118 Just found this and I'm about to try it now

3 Feb, 2026, 12:07

Okay so now I replaced my code with the exact code from the thread and I replaced my scheme with appwrite-callback-[myprojectId], and now it's bypassing that error however when I successfully login, it gets stuck on this loading screen and never redirects back to the app

3 Feb, 2026, 12:26

The problem is that on line 67 of this image, the result is never returning for some reason. After a while of waiting, I eventually close the auth screen so then the result.type resolves to "dismissed". When the type is dismissed, the url doesn't exist. It only exists when the type is "success" (hense the conditional on line 70). I have no idea why it's stuck on the loading screen and never resolving to "success". When i check the appwrite console, the new user IS being successfully created.

3 Feb, 2026, 12:46

Pls someone help I'm still stuck on this 😢

3 Feb, 2026, 14:39

FINALLYYYYYYY I found the solution. I was using a development build and eventhough I changed the scheme in my app.json to android-callback-projectId, it hadn't updated to that in my androidmanifest.xml file. To fix it, I just deleted the android folder and rebuilt it.

1
4 Feb, 2026, 17:50

[SOLVED] redirect uri not working for OAuth with Expo

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