Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Redirection on HTTPS callback scheme #505

Open
BraydenCh opened this issue Jun 17, 2024 · 5 comments
Open

Android Redirection on HTTPS callback scheme #505

BraydenCh opened this issue Jun 17, 2024 · 5 comments

Comments

@BraydenCh
Copy link

BraydenCh commented Jun 17, 2024

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>'

@bromar2292
Copy link

i have this same issue

@enesuzun2002
Copy link

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.

@hschaeufler
Copy link

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
Copy link

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

@enesuzun2002
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants