Skip to content

Commit 4becb8d

Browse files
committed
Update test app
1 parent 2fb94b1 commit 4becb8d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Demo App/Twift_SwiftUI/Twift_SwiftUIApp.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ extension Twift {
1313
switch authenticationType {
1414
case .appOnly(_): return false
1515
case .userAccessTokens(_, _): return true
16-
case .oauth2UserAuth(_): return true
16+
case .oauth2UserAuth(_, _): return true
1717
}
1818
}
1919
}
@@ -50,7 +50,9 @@ struct Twift_SwiftUIApp: App {
5050
scope: Set(OAuth2Scope.allCases))
5151

5252
if let user = user {
53-
container.client = Twift(.oauth2UserAuth(user))
53+
container.client = Twift(oauth2User: user) { refreshedToken in
54+
print(refreshedToken)
55+
}
5456

5557
try? await container.client?.refreshOAuth2AccessToken()
5658
}

0 commit comments

Comments
 (0)