flutter_appauth
flutter_appauth copied to clipboard
Redirect is not working on Android
I follow readme instruction for both platforms iOS and Android. In iOS everything is fine, but in Android redirect is not working. I set auth scheme in build.gradle and set queries element in AndroidManifest. Redirect URI is correct, cause in iOS working.
<img width="377" alt="Screenshot 2022-01-10 at 17 08 27" src="https://user-images.githubusercontent.com/32303723/1487888
02-e57b95e3-ac62-4f78-b9fd-c9dd69ac945c.png">

In Android after successful login it is white screen in browser and redirect is not working
If you've configured everything properly on your end when it comes to this plugin then I would suggest you check seeing if keycloak requires anything specific for Android that requires more setup outside of this plugin. I vaguely remember seeing others mentioning this but I've no experience with keycloak. I would suggest you ask on places like stack overflow, discord etc to see if anyone else has run into similar issues given the plugin works with other IdPs
Hi, @sylvestrevgen I had the same issue. a)I migrate the project embedding v2. b) in AndroidManifest.xml you should find <application android:label="auth0" android:name="${applicationName}" android:icon="@mipmap/ic_launcher"> <activity
and remove android:name="${applicationName}
In Android after successful login it is white screen in browser and redirect is not working
@sylvestrevgen Did you figure this out? I am having the same issue. @upruslanko What do you mean exactly, what did you delete from AndroidManifest.xml ?
If anyone hits this issue (white screen), its likely your appAuthRedirectScheme
that is wrong, and is causing the app to not respond to the redirect uri. My redirect uri was originally just a https url, after changing it to the format com.yourdomain:/auth
, as described here and changing the appAuthRedirectScheme to com.yourdomain
it worked.
I have the same issue. any solution ??
If anyone hits this issue (white screen), its likely your
appAuthRedirectScheme
that is wrong, and is causing the app to not respond to the redirect uri. My redirect uri was originally just a https url, after changing it to the formatcom.yourdomain:/auth
, as described here and changing the appAuthRedirectScheme tocom.yourdomain
it worked.
thanks, it worked for me
I have the same issue. Can anyone find the solution @MaikuB @emamagic @everystone
in Android Manifest :
Method :
AuthorizationTokenResponse? authorizationTokenResponse = await appAuth!.authorizeAndExchangeCode( AuthorizationTokenRequest( getAppConfig().apiUrlResource.fusionAuthClientId, getAppConfig().apiUrlResource.fusionAuthRedirectUrl, issuer: 'https://${getAppConfig().apiUrlResource.fusionAuthDomain}', scopes: <String>['offline_access'], ), );
REDIRECT URL : com.example.kipling://login-callback
in App Build Gradle :
Closing this as the issue is configuration-related and there's been no evidence to indicate it's an issue with the plugin or the SDKs the plugin uses
After many hours of debugging, it seems the appAuthRedirectScheme
must not contain underscores.
This is valid:
'appAuthRedirectScheme': 'some.name.here.no.underscore'
This is invalid
'appAuthRedirectScheme': 'some.name.here.with.underscore_'
@MaikuB would be great if you could add this to the documentation