File tree Expand file tree Collapse file tree
packages/oauth/client/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ export class OAuthClient {
335335 body ?: oauth . ProtectedResourceRequestBody ,
336336 options ?: oauth . ProtectedResourceRequestOptions ,
337337 ) {
338- const session = await this . restoreSession ( sessionId ) ;
338+ const session = await this . restoreSessionForId ( sessionId ) ;
339339 if ( session ) {
340340 return this . _makeProtectedRequest (
341341 session ,
@@ -384,15 +384,15 @@ export class OAuthClient {
384384 ) ;
385385 }
386386
387- async restoreSession ( id : string ) {
387+ async restoreSessionForId ( id : string ) {
388388 // Get the session
389389 const session = await this . getSession ( id ) ;
390390 if ( session ) {
391391 // Check if the session is expired
392392 const isExpired = isAccessTokenExpired ( session . access_token ) ;
393393 if ( isExpired ) {
394394 // Refresh the session
395- return await this . refreshSession ( id ) ;
395+ return await this . refreshSessionForSessionId ( id ) ;
396396 }
397397
398398 return session ;
@@ -410,7 +410,7 @@ export class OAuthClient {
410410 await this . sessionStore . set ( sessionId , session ) ;
411411 }
412412
413- private async refreshSession ( sessionId : string ) {
413+ private async refreshSessionForSessionId ( sessionId : string ) {
414414 const session = await this . getSession ( sessionId ) ;
415415
416416 if ( ! session ) {
You can’t perform that action at this time.
0 commit comments