Fix issue where app sometimes launches to login screen even though you are already logged in.

This commit is contained in:
shannon 2024-11-07 08:56:03 -05:00
parent 9d774cb541
commit 531c1a054e
1 changed files with 2 additions and 0 deletions

View File

@ -248,9 +248,11 @@ extension SceneCoordinator {
extension SceneCoordinator { extension SceneCoordinator {
@MainActor
func setup() { func setup() {
let rootViewController: UIViewController let rootViewController: UIViewController
AuthenticationServiceProvider.shared.prepareForUse()
let _authentication = AuthenticationServiceProvider.shared.authenticationSortedByActivation().first let _authentication = AuthenticationServiceProvider.shared.authenticationSortedByActivation().first
let _authContext = _authentication.flatMap { AuthContext(authentication: $0) } let _authContext = _authentication.flatMap { AuthContext(authentication: $0) }
self.authContext = _authContext self.authContext = _authContext