Naos
Im trying to get this going but no matter what I put in the redirect urls I keep getting the same error "URL Host must be one of: -list of web platforms added in appwrite-"
- if I put them to "appwrite-callback-[projectid]" I get an error from the appwrite server that it doesnt conform the my set web platform
- if I put them to "null" it interprets them as empty / missing
- If I just not set them it thinks I want to set the scopes variable as the redirect url and complains
- "com.yourdomain.app://oauth2redirect", / doesnt work
- Localhost doesnt work
- etc public static void performOAuth(AppCompatActivity activity) { List<String> scopes = Arrays.asList("User.Read", "User.ReadBasic.All"); // Adjust scopes as needed account.createOAuth2Session( activity, OAuthProvider.MICROSOFT, null, null, scopes, new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); return; } Log.d("Appwrite", result.toString()); }) ); }
TL;DR
Issue with setting redirect URLs for oAuth2 in native Java with Appwrite. Developers facing errors due to incorrect redirect URLs. URLs like "appwrite-callback-[projectid]", "null", and localhosts not working.
Solution: Make sure to set valid redirect URLs in the Appwrite server console. Double-check URLs and verify they match the allowed web platforms list in Appwrite. Recommended threads
- Appwrite general_unauthorized_scope erro...
help me to fix this error. I use appwrite phone number authentication. after creating session with id and secret when I try to get user the I got this error
- 'Appwrite Exception: Network request fai...
I am getting a 'Appwrite Exception: Network request failed' error while trying to create a new user. I'm following JSM's React Native course (https://www.youtub...
- [SOLVED] Getting an error with google au...
``` TypeError: Failed to construct 'URL': Invalid URL at Account.createOAuth2Session (sdk.js:1327:21) at loginWithGoogle (Auth.ts:76:25) at handleGo...