@@ -24,6 +24,9 @@ extension AuthClient {
2424 public var headers : [ String : String ]
2525 public let flowType : AuthFlowType
2626 public let redirectToURL : URL ?
27+
28+ /// Optional key name used for storing tokens in local storage.
29+ public var storageKey : String ?
2730 public let localStorage : any AuthLocalStorage
2831 public let logger : ( any SupabaseLogger ) ?
2932 public let encoder : JSONEncoder
@@ -40,6 +43,7 @@ extension AuthClient {
4043 /// - headers: Custom headers to be included in requests.
4144 /// - flowType: The authentication flow type.
4245 /// - 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.
4347 /// - localStorage: The storage mechanism for local data.
4448 /// - logger: The logger to use.
4549 /// - encoder: The JSON encoder to use for encoding requests.
@@ -51,6 +55,7 @@ extension AuthClient {
5155 headers: [ String : String ] = [ : ] ,
5256 flowType: AuthFlowType = Configuration . defaultFlowType,
5357 redirectToURL: URL ? = nil ,
58+ storageKey: String ? = nil ,
5459 localStorage: any AuthLocalStorage ,
5560 logger: ( any SupabaseLogger ) ? = nil ,
5661 encoder: JSONEncoder = AuthClient . Configuration. jsonEncoder,
@@ -64,6 +69,7 @@ extension AuthClient {
6469 self . headers = headers
6570 self . flowType = flowType
6671 self . redirectToURL = redirectToURL
72+ self . storageKey = storageKey
6773 self . localStorage = localStorage
6874 self . logger = logger
6975 self . encoder = encoder
@@ -80,6 +86,7 @@ extension AuthClient {
8086 /// - headers: Custom headers to be included in requests.
8187 /// - flowType: The authentication flow type..
8288 /// - 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.
8390 /// - localStorage: The storage mechanism for local data..
8491 /// - logger: The logger to use.
8592 /// - encoder: The JSON encoder to use for encoding requests.
@@ -91,6 +98,7 @@ extension AuthClient {
9198 headers: [ String : String ] = [ : ] ,
9299 flowType: AuthFlowType = AuthClient . Configuration. defaultFlowType,
93100 redirectToURL: URL ? = nil ,
101+ storageKey: String ? = nil ,
94102 localStorage: any AuthLocalStorage ,
95103 logger: ( any SupabaseLogger ) ? = nil ,
96104 encoder: JSONEncoder = AuthClient . Configuration. jsonEncoder,
@@ -104,6 +112,7 @@ extension AuthClient {
104112 headers: headers,
105113 flowType: flowType,
106114 redirectToURL: redirectToURL,
115+ storageKey: storageKey,
107116 localStorage: localStorage,
108117 logger: logger,
109118 encoder: encoder,
0 commit comments