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.
What's your app.json?
And can you log what your passing for the success URL?
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://
And I tried putting this as a platform in my console and it doesnt fix the issue
https://github.com/appwrite/appwrite/issues/10118 Just found this and I'm about to try it now
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
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.
Pls someone help I'm still stuck on this 😢
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.
[SOLVED] redirect uri not working for OAuth with Expo
Recommended threads
- [Solved]
I have github student account. The auth has been paused however the database is working fine. I cant see any option to resume from my console panel. It is just ...
- [Solved] Appwrite project paused
I have github student account. The auth has been paused however the database is working fine. I cant see any option to resume from my console panel. It is just ...
- Google OAuth Not Working on Brave/Firefo...
I'm having an issue with Google OAuth in my React + Appwrite app. After login, the dashboard is accessible only in Microsoft Edge, but fails in Brave and Firefo...