Skip to content

Commit 56d7a8f

Browse files
committed
clean up session restore/refresh naming
1 parent 6c4361c commit 56d7a8f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/oauth/client/src/client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)