diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/SignOut/ShowHostedUISignOut.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/SignOut/ShowHostedUISignOut.swift index 9efbea9b5d..10db773e4b 100644 --- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/SignOut/ShowHostedUISignOut.swift +++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/SignOut/ShowHostedUISignOut.swift @@ -46,6 +46,12 @@ class ShowHostedUISignOut: NSObject, Action { callbackScheme: callbackURLScheme, inPrivate: false, presentationAnchor: signOutEvent.presentationAnchor) + #else + _ = try await sessionAdapter.showHostedUI( + url: logoutURL, + callbackScheme: callbackURLScheme, + inPrivate: false, + presentationAnchor: nil) #endif await sendEvent(with: nil, dispatcher: dispatcher, environment: environment) } catch { diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/CodeGen/Data/SignOutEventData.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/CodeGen/Data/SignOutEventData.swift index 99d49f3be9..7b8bdd1666 100644 --- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/CodeGen/Data/SignOutEventData.swift +++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/CodeGen/Data/SignOutEventData.swift @@ -18,6 +18,10 @@ struct SignOutEventData { self.globalSignOut = globalSignOut self.presentationAnchor = presentationAnchor } + #else + init(globalSignOut: Bool) { + self.globalSignOut = globalSignOut + } #endif }