Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardsph committed Feb 22, 2024
1 parent af81035 commit 9ce2e91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 4 additions & 6 deletions packages/core/src/storage/StorageUtility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,8 @@ export default class StorageUtility implements IStorageUtility {
userId: string,
secure?: boolean,
): Promise<Record<string, string>> {
const stored = await (secure
? this.secureStorage
: this.insecureStorage
const stored = await (
secure ? this.secureStorage : this.insecureStorage
).get(this.getKey(userId));

if (stored === undefined) {
Expand Down Expand Up @@ -189,9 +188,8 @@ export default class StorageUtility implements IStorageUtility {
key: string,
options?: { errorIfNull?: boolean; secure?: boolean },
): Promise<string | undefined> {
const value = await (options?.secure
? this.secureStorage
: this.insecureStorage
const value = await (
options?.secure ? this.secureStorage : this.insecureStorage
).get(key);
if (value === undefined && options?.errorIfNull) {
throw new Error(`[${key}] is not stored`);
Expand Down
6 changes: 4 additions & 2 deletions packages/node/src/login/oidc/ClientRegistrar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,17 @@ describe("ClientRegistrar", () => {
// Check that the returned algorithm value is what we expect
expect(client.idTokenSignedResponseAlg).toBe(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
IssuerConfigFetcherFetchConfigResponse.idTokenSigningAlgValuesSupported![0],
IssuerConfigFetcherFetchConfigResponse
.idTokenSigningAlgValuesSupported![0],
);

// Check that the expected algorithm information have been saved in storage
await expect(
mockStorage.getForUser("mySession", "idTokenSignedResponseAlg"),
).resolves.toBe(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
IssuerConfigFetcherFetchConfigResponse.idTokenSigningAlgValuesSupported![0],
IssuerConfigFetcherFetchConfigResponse
.idTokenSigningAlgValuesSupported![0],
);
});
});
Expand Down

0 comments on commit 9ce2e91

Please sign in to comment.