@@ -24,6 +24,9 @@ extension AuthClient {
24
24
public var headers : [ String : String ]
25
25
public let flowType : AuthFlowType
26
26
public let redirectToURL : URL ?
27
+
28
+ /// Optional key name used for storing tokens in local storage.
29
+ public var storageKey : String ?
27
30
public let localStorage : any AuthLocalStorage
28
31
public let logger : ( any SupabaseLogger ) ?
29
32
public let encoder : JSONEncoder
@@ -40,6 +43,7 @@ extension AuthClient {
40
43
/// - headers: Custom headers to be included in requests.
41
44
/// - flowType: The authentication flow type.
42
45
/// - redirectToURL: Default URL to be used for redirect on the flows that requires it.
46
+ /// - storageKey: Optional key name used for storing tokens in local storage.
43
47
/// - localStorage: The storage mechanism for local data.
44
48
/// - logger: The logger to use.
45
49
/// - encoder: The JSON encoder to use for encoding requests.
@@ -51,6 +55,7 @@ extension AuthClient {
51
55
headers: [ String : String ] = [ : ] ,
52
56
flowType: AuthFlowType = Configuration . defaultFlowType,
53
57
redirectToURL: URL ? = nil ,
58
+ storageKey: String ? = nil ,
54
59
localStorage: any AuthLocalStorage ,
55
60
logger: ( any SupabaseLogger ) ? = nil ,
56
61
encoder: JSONEncoder = AuthClient . Configuration. jsonEncoder,
@@ -64,6 +69,7 @@ extension AuthClient {
64
69
self . headers = headers
65
70
self . flowType = flowType
66
71
self . redirectToURL = redirectToURL
72
+ self . storageKey = storageKey
67
73
self . localStorage = localStorage
68
74
self . logger = logger
69
75
self . encoder = encoder
@@ -80,6 +86,7 @@ extension AuthClient {
80
86
/// - headers: Custom headers to be included in requests.
81
87
/// - flowType: The authentication flow type..
82
88
/// - redirectToURL: Default URL to be used for redirect on the flows that requires it.
89
+ /// - storageKey: Optional key name used for storing tokens in local storage.
83
90
/// - localStorage: The storage mechanism for local data..
84
91
/// - logger: The logger to use.
85
92
/// - encoder: The JSON encoder to use for encoding requests.
@@ -91,6 +98,7 @@ extension AuthClient {
91
98
headers: [ String : String ] = [ : ] ,
92
99
flowType: AuthFlowType = AuthClient . Configuration. defaultFlowType,
93
100
redirectToURL: URL ? = nil ,
101
+ storageKey: String ? = nil ,
94
102
localStorage: any AuthLocalStorage ,
95
103
logger: ( any SupabaseLogger ) ? = nil ,
96
104
encoder: JSONEncoder = AuthClient . Configuration. jsonEncoder,
@@ -104,6 +112,7 @@ extension AuthClient {
104
112
headers: headers,
105
113
flowType: flowType,
106
114
redirectToURL: redirectToURL,
115
+ storageKey: storageKey,
107
116
localStorage: localStorage,
108
117
logger: logger,
109
118
encoder: encoder,
0 commit comments