File tree Expand file tree Collapse file tree 3 files changed +7
-22
lines changed Expand file tree Collapse file tree 3 files changed +7
-22
lines changed Original file line number Diff line number Diff line change 2
2
import Foundation
3
3
@preconcurrency import KeychainAccess
4
4
5
- struct KeychainLocalStorage : AuthLocalStorage {
5
+ public struct KeychainLocalStorage : AuthLocalStorage {
6
6
private let keychain : Keychain
7
7
8
- init ( service: String , accessGroup: String ? ) {
8
+ public init ( service: String , accessGroup: String ? ) {
9
9
if let accessGroup {
10
10
keychain = Keychain ( service: service, accessGroup: accessGroup)
11
11
} else {
12
12
keychain = Keychain ( service: service)
13
13
}
14
14
}
15
15
16
- func store( key: String , value: Data ) throws {
16
+ public func store( key: String , value: Data ) throws {
17
17
try keychain. set ( value, key: key)
18
18
}
19
19
20
- func retrieve( key: String ) throws -> Data ? {
20
+ public func retrieve( key: String ) throws -> Data ? {
21
21
try keychain. getData ( key)
22
22
}
23
23
24
- func remove( key: String ) throws {
24
+ public func remove( key: String ) throws {
25
25
try keychain. remove ( key)
26
26
}
27
27
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ public final class SupabaseClient: @unchecked Sendable {
121
121
public convenience init (
122
122
supabaseURL: String ,
123
123
supabaseKey: String ,
124
- options: SupabaseClientOptions = . init( auth: . init( storage: LocalStorageEngines . keychain ) )
124
+ options: SupabaseClientOptions = . init( auth: . init( storage: KeychainLocalStorage ( service : " supabase.gotrue.swift " , accessGroup : nil ) ) )
125
125
) {
126
126
guard let supabaseURL = URL ( string: supabaseURL) else {
127
127
fatalError ( " Invalid supabaseURL: \( supabaseURL) " )
@@ -142,7 +142,7 @@ public final class SupabaseClient: @unchecked Sendable {
142
142
public convenience init (
143
143
supabaseURL: String ,
144
144
supabaseKey: String ,
145
- options: SupabaseClientOptions = . init( auth: . init( storage: LocalStorageEngines . wincred ) )
145
+ options: SupabaseClientOptions = . init( auth: . init( storage: WinCredLocalStorage ( service : " supabase.gotrue.swift " ) ) )
146
146
) {
147
147
guard let supabaseURL = URL ( string: supabaseURL) else {
148
148
fatalError ( " Invalid supabaseURL: \( supabaseURL) " )
You can’t perform that action at this time.
0 commit comments