Skip to content

Commit 0f4bfcf

Browse files
authored
Merge pull request #51 from kinde-oss/fix/ts-lint-issues
fix: ts-lint errors
2 parents a0353d6 + 1d23640 commit 0f4bfcf

File tree

8 files changed

+8
-7
lines changed

8 files changed

+8
-7
lines changed

.eslintrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ parserOptions:
1212
ignorePatterns:
1313
- dist
1414
- dist-cjs
15+
- lib/__tests__/**
1516
- lib/apis/**
1617
- lib/models/**
1718
- lib/index.ts

.github/workflows/build-test-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ jobs:
3232
run: pnpm config set enable-pre-post-scripts true
3333
- run: pnpm install
3434
- run: pnpm build
35+
- run: pnpm lint
3536
- run: pnpm test

lib/sdk/clients/browser/authcode-with-pkce.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const createAuthCodeWithPKCEClient = (options: BrowserPKCEClientOptions) => {
175175
`Cannot return claim "${claim}", no authentication credential found`
176176
);
177177
}
178-
return tokenClaims.getClaimValue(sessionManager, claim, type);
178+
return await tokenClaims.getClaimValue(sessionManager, claim, type);
179179
};
180180

181181
/**

lib/sdk/clients/server/authorization-code.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { AuthorizationCode, AuthCodeWithPKCE } from '../../oauth2-flows/index.js';
2-
import { default as withAuthUtilities } from './with-auth-utilities.js';
2+
import withAuthUtilities from './with-auth-utilities.js';
33
import { type SessionManager } from '../../session-managers/index.js';
44
import type { UserType } from '../../utilities/index.js';
55
import * as utilities from '../../utilities/index.js';

lib/sdk/clients/server/client-credentials.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { default as withAuthUtilities } from './with-auth-utilities.js';
1+
import withAuthUtilities from './with-auth-utilities.js';
22
import { type SessionManager } from '../../session-managers/index.js';
33
import { ClientCredentials } from '../../oauth2-flows/index.js';
44
import type { CCClientOptions } from '../types.js';

lib/sdk/clients/server/with-auth-utilities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SessionManager } from '../../session-managers';
1+
import { type SessionManager } from '../../session-managers';
22
import * as utilities from '../../utilities/index.js';
33

44
import type {
@@ -93,7 +93,7 @@ const withAuthUtilities = (
9393
`Cannot return claim "${claim}", no authentication credential found`
9494
);
9595
}
96-
return tokenClaims.getClaimValue(sessionManager, claim, type);
96+
return await tokenClaims.getClaimValue(sessionManager, claim, type);
9797
};
9898

9999
/**

lib/sdk/utilities/token-claims.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { type SessionManager } from '../session-managers/index.js';
2-
import { isTokenExpired } from './token-utils.js';
32
import { type ClaimTokenType } from './types.js';
43
import { jwtDecode } from 'jwt-decode';
54

lib/sdk/utilities/token-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,5 @@ export const isTokenExpired = (token: string | null): boolean => {
133133
const currentUnixTime = Math.floor(Date.now() / 1000);
134134
const tokenPayload = jwtDecode(token);
135135
if (!tokenPayload.exp) return true;
136-
return currentUnixTime >= tokenPayload.exp!;
136+
return currentUnixTime >= tokenPayload.exp;
137137
};

0 commit comments

Comments
 (0)