File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 3
3
import Security
4
4
5
5
struct Keychain {
6
- let service : String
6
+ let service : String ?
7
7
let accessGroup : String ?
8
8
9
9
init (
10
- service: String ,
10
+ service: String ? ,
11
11
accessGroup: String ? = nil
12
12
) {
13
13
self . service = service
55
55
private func baseQuery( withKey key: String ? = nil , data: Data ? = nil ) -> [ String : Any ] {
56
56
var query : [ String : Any ] = [ : ]
57
57
query [ kSecClass as String ] = kSecClassGenericPassword
58
- query [ kSecAttrService as String ] = service
59
58
59
+ if let service {
60
+ query [ kSecAttrService as String ] = service
61
+ }
60
62
if let key {
61
63
query [ kSecAttrAccount as String ] = key
62
64
}
Original file line number Diff line number Diff line change 5
5
public struct KeychainLocalStorage : AuthLocalStorage {
6
6
private let keychain : Keychain
7
7
8
- public init ( service: String = " supabase.gotrue.swift " , accessGroup: String ? = nil ) {
8
+ public init ( service: String ? = " supabase.gotrue.swift " , accessGroup: String ? = nil ) {
9
9
keychain = Keychain ( service: service, accessGroup: accessGroup)
10
10
}
11
11
You can’t perform that action at this time.
0 commit comments