File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
packages/authentication-client/src Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -132,13 +132,13 @@ const controller = new AbortController()
132132
133133app .configure (restClient .fetch (fetch))
134134
135- const promise = app .service (' messages' ).get (1 , {
135+ app .service (' messages' ).get (1 , {
136136 connection: {
137137 signal: controller .signal
138138 }
139139})
140140
141- promise .abort ()
141+ controller .abort ()
142142```
143143
144144#### Superagent
Original file line number Diff line number Diff line change @@ -166,9 +166,10 @@ export class AuthenticationClient {
166166 *
167167 * @param force force reauthentication with the server
168168 * @param strategy The name of the strategy to use. Defaults to `options.jwtStrategy`
169+ * @param authParams Additional authentication parameters
169170 * @returns The reauthentication result
170171 */
171- reAuthenticate ( force = false , strategy ?: string ) : Promise < AuthenticationResult > {
172+ reAuthenticate ( force = false , strategy ?: string , authParams ?: Params ) : Promise < AuthenticationResult > {
172173 // Either returns the authentication state or
173174 // tries to re-authenticate with the stored JWT and strategy
174175 let authPromise = this . app . get ( 'authentication' )
@@ -179,10 +180,13 @@ export class AuthenticationClient {
179180 return this . handleError ( new NotAuthenticated ( 'No accessToken found in storage' ) , 'authenticate' )
180181 }
181182
182- return this . authenticate ( {
183- strategy : strategy || this . options . jwtStrategy ,
184- accessToken
185- } )
183+ return this . authenticate (
184+ {
185+ strategy : strategy || this . options . jwtStrategy ,
186+ accessToken
187+ } ,
188+ authParams
189+ )
186190 } )
187191 this . app . set ( 'authentication' , authPromise )
188192 }
You can’t perform that action at this time.
0 commit comments