MaikuB / flutter_appauth

A Flutter wrapper for AppAuth iOS and Android SDKs
271 stars 244 forks source link

PlatformException(null_intent, Failed to authorize: Null intent received, null, null) #252

Closed endritgojanikodelabs closed 1 year ago

endritgojanikodelabs commented 2 years ago

final AuthorizationTokenResponse result = await _appAuth.authorizeAndExchangeCode( AuthorizationTokenRequest( _clientId, _redirectUrl, issuer: _discoveryUrl, additionalParameters: {'domain': domain}, ), ); After I login I'm gooing back to the app by redirect url and getting this error: PlatformException(null_intent, Failed to authorize: Null intent received, null, null)

MaikuB commented 2 years ago

Please provide steps to reproduce this, preferably via fork of the repo and using the example app. A search across the repo with this error message would indicate that your issue is the first time something like this has been reported so chances are you've misconfigured something. Haven't tried it but what comes to mind is perhaps you have turned on the "Don't keep activities" setting the developer mode options?

postflow commented 2 years ago

I think what you applicationID in Android contain symbol "_" or capital letters.

konnic commented 2 years ago

I had just saw this error as well. I resolved it by enabling flutter deep linking (see: https://docs.flutter.dev/development/ui/navigation/deep-linking#enable-deep-linking-on-android), because my redirect URI is not the android package, but a custom (shorter) scheme.

MartinAKovachev commented 1 year ago

I had just saw this error as well. I resolved it by enabling flutter deep linking (see: https://docs.flutter.dev/development/ui/navigation/deep-linking#enable-deep-linking-on-android), because my redirect URI is not the android package, but a custom (shorter) scheme.

We have it turned on for the .MainActivity but the issue is still appearing.