diff --git a/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift b/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift index cabea0942..1f327fd83 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift @@ -40,7 +40,7 @@ import Views do { try await dataService.deleteAccount(userID: currentViewer.unwrappedUserID) - authenticator.logout(dataService: dataService, showAppleRevokeTokenAlert: true) + authenticator.logout(dataService: dataService, isAccountDeletion: true) } catch { deleteAccountErrorMessage = "We were unable to delete your account." } diff --git a/apple/OmnivoreKit/Sources/Services/Authentication/Authenticator.swift b/apple/OmnivoreKit/Sources/Services/Authentication/Authenticator.swift index 2d5a5dc6b..b0ccfba59 100644 --- a/apple/OmnivoreKit/Sources/Services/Authentication/Authenticator.swift +++ b/apple/OmnivoreKit/Sources/Services/Authentication/Authenticator.swift @@ -37,12 +37,12 @@ public final class Authenticator: ObservableObject { ValetKey.authToken.value() } - public func logout(dataService: DataService, showAppleRevokeTokenAlert _: Bool = false) { + public func logout(dataService: DataService, isAccountDeletion: Bool = false) { dataService.resetCoreData() clearCreds() Authenticator.unregisterIntercomUser?() isLoggedIn = false - showAppleRevokeTokenAlert = true + showAppleRevokeTokenAlert = isAccountDeletion } public func clearCreds() {