From e85f5f4568e0b0a8a9024b9530da5e5ebc92b302 Mon Sep 17 00:00:00 2001 From: jey Date: Mon, 12 Aug 2024 18:36:06 -0500 Subject: [PATCH] AuthorizationService is disposed of right after it has created the authorization request intent --- .../forgerock/android/auth/centralize/AuthorizeContract.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/forgerock-auth/src/main/java/org/forgerock/android/auth/centralize/AuthorizeContract.kt b/forgerock-auth/src/main/java/org/forgerock/android/auth/centralize/AuthorizeContract.kt index 31ca7e41..dd72f400 100644 --- a/forgerock-auth/src/main/java/org/forgerock/android/auth/centralize/AuthorizeContract.kt +++ b/forgerock-auth/src/main/java/org/forgerock/android/auth/centralize/AuthorizeContract.kt @@ -72,7 +72,12 @@ internal class AuthorizeContract : configurer.customTabsIntentBuilder.accept(intentBuilder) val request = builder.build() - return authorizationService.getAuthorizationRequestIntent(request, intentBuilder.build()) + + val authIntent = authorizationService.getAuthorizationRequestIntent(request, intentBuilder.build()) + // Dispose of the AuthorizationService after creating the intent + authorizationService.dispose() + + return authIntent }