ArnavOriginal post
Flutter Developer
I have been trying to login via google on my flutter app running on windows. The redirect URI is correct in URL state as well as in my code. But I still get
Missing redirect URL
Your OAuth login flow is missing a proper redirect URL. Please check the OAuth docs and send request for new session with a valid callback URL.
This is my flutter code
var _codeListenerServer = await HttpServer.bind('localhost', 0);
print('Listening on localhost:${_codeListenerServer.port}');
_account.createOAuth2Session(provider: "google",success: "http://localhost:${_codeListenerServer.port}/auth/oauth2/success");
I also tired it without the HttpServer.
Edit : Using appwrite cloud and Flutter SDK version 11.0.1 tried it with higher 12.0.1 version as well facing the same problem
Summary
Developers trying to implement Google login on a Flutter app in Windows are facing an issue with OAuth2 redirect URL, despite having the correct URI in both the code and URL state. The error message "Missing redirect URL" is being displayed. The developers have tried using an HttpServer with no success. This issue is being encountered while using Appwrite Cloud with Flutter SDK versions 11.0.1 and 12.0.1.