flutter_appauth icon indicating copy to clipboard operation
flutter_appauth copied to clipboard

Android Redirection on HTTPS callback scheme

Open BraydenCh opened this issue 1 year ago • 5 comments

My redirect URI is an Azure B2C link that is an https scheme, upon a successful login, I do not seem to redirect back to the main client. This was working a few weeks ago, but when I went to reload it and test it a few days ago, it would simply not redirect back...

I know all my links are correct (redirectUri, authEndpoint,tokenEndpoint, discoveryURL, clientID etc) when utilizing AuthorizeAndExchangeCode... which means the issue must be either my build.gradle or my AndroidManifest.xml from what I understand.

My AndroidManifest has added a new activity of net.openid.appauth.RedirectUriRecieverActivity with an intent filter that contains VIEW, DEFAULT, BROWSER, and the following: <data android:scheme="https" android:host="<your_custom_host> android:path= "<ending_path>"/>

and my build.gradle has the manifest placeholder of 'appAuthRedirectScheme' = 'https', 'appAuthRedirectHost' = '<your_custom_host>', 'appAuthRedirectPath' = '<ending_path>'

BraydenCh avatar Jun 17 '24 19:06 BraydenCh

i have this same issue

bromar2292 avatar Jul 11 '24 09:07 bromar2292

Same issue with this extra error

android\app\src\debug\AndroidManifest.xml Error: Attribute data@host at AndroidManifest.xml requires a placeholder substitution but no value for <auth0Domain> is provided.

android\app\src\debug\AndroidManifest.xml Error: Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for <auth0Scheme> is provided.

enesuzun2002 avatar Jul 26 '24 11:07 enesuzun2002

My redirect URI is an Azure B2C link that is an https scheme, upon a successful login, I do not seem to redirect back to the main client. This was working a few weeks ago, but when I went to reload it and test it a few days ago, it would simply not redirect back...

I know all my links are correct (redirectUri, authEndpoint,tokenEndpoint, discoveryURL, clientID etc) when utilizing AuthorizeAndExchangeCode... which means the issue must be either my build.gradle or my AndroidManifest.xml from what I understand.

My AndroidManifest has added a new activity of net.openid.appauth.RedirectUriRecieverActivity with an intent filter that contains VIEW, DEFAULT, BROWSER, and the following: <data android:scheme="https" android:host="<your_custom_host> android:path= "<ending_path>"/>

and my build.gradle has the manifest placeholder of 'appAuthRedirectScheme' = 'https', 'appAuthRedirectHost' = '<your_custom_host>', 'appAuthRedirectPath' = '<ending_path>'

When you are using a custom Https scheme, does your page have a valid assetlinks.json under https://example.com/.well-known/assetlinks.json? And does it contain the sha256_cert_fingerprints of your Signing-/Debugging-Certificate?

https://developer.android.com/training/app-links/verify-android-applinks?hl=de

hschaeufler avatar Aug 23 '24 17:08 hschaeufler

Same issue with this extra error

android\app\src\debug\AndroidManifest.xml Error: Attribute data@host at AndroidManifest.xml requires a placeholder substitution but no value for is provided.

android\app\src\debug\AndroidManifest.xml Error: Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for is provided.

Do you have defined manifestPlaceholders in your build.gradle for your flavor(s)?

Like described here: https://developer.android.com/build/manage-manifests?hl=de and here https://pub.dev/packages/flutter_appauth

hschaeufler avatar Aug 23 '24 17:08 hschaeufler

Same issue with this extra error android\app\src\debug\AndroidManifest.xml Error: Attribute data@host at AndroidManifest.xml requires a placeholder substitution but no value for is provided. android\app\src\debug\AndroidManifest.xml Error: Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for is provided.

Do you have defined manifestPlaceholders in your build.gradle for your flavor(s)?

Like described here: https://developer.android.com/build/manage-manifests?hl=de and here https://pub.dev/packages/flutter_appauth

Thanks for responding, i have fixed my issue it was because android wasn't enabling the open by default on url if the app is in debug mode.

enesuzun2002 avatar Aug 24 '24 11:08 enesuzun2002