File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
android/src/main/java/com/rnappauth Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 13
13
import androidx .browser .customtabs .CustomTabsClient ;
14
14
import androidx .browser .customtabs .CustomTabsServiceConnection ;
15
15
import androidx .browser .customtabs .CustomTabsSession ;
16
+ import androidx .browser .customtabs .CustomTabsIntent ;
17
+ import androidx .browser .customtabs .TrustedWebUtils ;
16
18
17
19
import com .facebook .react .bridge .ActivityEventListener ;
18
20
import com .facebook .react .bridge .ReactApplicationContext ;
@@ -712,7 +714,12 @@ private void authorizeWithConfiguration(
712
714
713
715
if (android .os .Build .VERSION .SDK_INT >= android .os .Build .VERSION_CODES .LOLLIPOP ) {
714
716
AuthorizationService authService = new AuthorizationService (context , appAuthConfiguration );
715
- Intent authIntent = authService .getAuthorizationRequestIntent (authRequest );
717
+
718
+ CustomTabsIntent .Builder intentBuilder = authService .createCustomTabsIntentBuilder ();
719
+ CustomTabsIntent customTabsIntent = intentBuilder .build ();
720
+ customTabsIntent .intent .putExtra (TrustedWebUtils .EXTRA_LAUNCH_AS_TRUSTED_WEB_ACTIVITY , true );
721
+
722
+ Intent authIntent = authService .getAuthorizationRequestIntent (authRequest , customTabsIntent );
716
723
717
724
currentActivity .startActivityForResult (authIntent , 52 );
718
725
} else {
You can’t perform that action at this time.
0 commit comments