File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 66//
77import  Combine
88import  Foundation
9+ #if canImport(LocalAuthentication) 
910import  LocalAuthentication
11+ #endif 
1012import  Observation
1113
1214/// The default file name that holds the list of providers.
Original file line number Diff line number Diff line change 44//
55//  Created by Kevin McKee
66//
7- 
7+ #if !os(tvOS) 
88import  Foundation
99import  LocalAuthentication
1010
@@ -31,3 +31,4 @@ class OAuthTestLAContext: LAContext {
3131        reply ( true ,  nil ) 
3232    } 
3333} 
34+ #endif 
Original file line number Diff line number Diff line change 55//  Created by Kevin McKee
66//
77import  Foundation
8+ #if canImport(LocalAuthentication) 
89import  LocalAuthentication
10+ #endif 
911@testable   import  OAuthKit
1012import  Testing
1113
@@ -69,12 +71,14 @@ final class OAuthTests {
6971    @Test ( " When Requiring Local Authentication " )  
7072    func  whenRequiringAuthenticationWithBiometricsOrCompanion( )  async  throws  { 
7173        let  appTag :  String  =  . secureRandom( ) 
72-         let  context :  LAContext  =  OAuthTestLAContext ( ) 
73-         let  options :  [ OAuth . Option :  Any ]  =  [ 
74+         var  options :  [ OAuth . Option :  Any ]  =  [ 
7475            . applicationTag:  appTag, 
75-             . localAuthentication:  context, 
7676            . requireAuthenticationWithBiometricsOrCompanion:  true , 
77-             . autoRefresh:  true ] 
77+             . autoRefresh:  true 
78+         ] 
79+         #if !os(tvOS) 
80+         options [ . localAuthentication]  =  OAuthTestLAContext ( ) 
81+         #endif 
7882        let  customOAuth :  OAuth  =  . init( . module,  options:  options) 
7983        #expect( customOAuth. providers. isNotEmpty) 
8084        #expect( customOAuth. requireAuthenticationWithBiometricsOrCompanion ==  true ) 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments