xamarin / Essentials

Xamarin.Essentials is no longer supported. Migrate your apps to .NET MAUI, which includes Maui.Essentials.
https://aka.ms/xamarin-upgrade
Other
1.52k stars 505 forks source link

WebAuthenticator CustomTab wont redirect to App #1983

Open AndersEben opened 2 years ago

AndersEben commented 2 years ago

I started using the Web Authenticator to do twitch auth for an app, but the browser does not close and redirects back to the app. I build my auth like the example on https://docs.microsoft.com/de-de/xamarin/essentials/web-authenticator but wenn i add the Manifest lines and open it in CustTab it wont redirect the answer to my app only shows me the callback from twitch as page unavailable because of redirect to localhost.

without the Manifest change the Web Authenticator opens browser and by recieving the callback it ask for "Open" and wenn i choose my app it get the results and i can work with. What Im doing wrong ?

App goes from Android 8-11 (11 requires CustomTabsService?) Essentials 1.7.1

Ludovic192 commented 2 years ago

Hi, I'm having the exact same problem as @AndersEben . It is maybe worth mentioning that it works fine in an android 11 emulator, even with the manifest change. However, any physical device with android 11 we tried had the issue described.

alextorres50 commented 2 years ago

add

I started using the Web Authenticator to do twitch auth for an app, but the browser does not close and redirects back to the app. I build my auth like the example on https://docs.microsoft.com/de-de/xamarin/essentials/web-authenticator but wenn i add the Manifest lines and open it in CustTab it wont redirect the answer to my app only shows me the callback from twitch as page unavailable because of redirect to localhost.

without the Manifest change the Web Authenticator opens browser and by recieving the callback it ask for "Open" and wenn i choose my app it get the results and i can work with. What Im doing wrong ?

App goes from Android 8-11 (11 requires CustomTabsService?) Essentials 1.7.1

Add in Manifest

    <queries>
        <intent>
            <action android:name="android.support.customtabs.action.CustomTabsService" />
        </intent>
    </queries>