From 1fabe5f776e39da32c23d0730d01529a4ee5a29c Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Sat, 18 Nov 2023 18:52:19 +0100 Subject: [PATCH] Restore Credentials from Keychain (#1171) --- ShareActionExtension/Scene/ShareViewController.swift | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ShareActionExtension/Scene/ShareViewController.swift b/ShareActionExtension/Scene/ShareViewController.swift index f30040150..4418c52bc 100644 --- a/ShareActionExtension/Scene/ShareViewController.swift +++ b/ShareActionExtension/Scene/ShareViewController.swift @@ -160,9 +160,11 @@ extension ShareViewController { extension ShareViewController { private func setupAuthContext() throws -> AuthContext? { - let _authentication = AuthenticationServiceProvider.shared.authenticationSortedByActivation().first - let _authContext = _authentication.flatMap { AuthContext(authentication: $0) } - return _authContext + AuthenticationServiceProvider.shared.restore() + + let authentication = AuthenticationServiceProvider.shared.authenticationSortedByActivation().first + let authContext = authentication.flatMap { AuthContext(authentication: $0) } + return authContext } private func setupHintLabel() {