Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Cognito as a MultiKey #603

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
revert
heliuchuan committed Dec 12, 2024
commit b58cc1e3f5e27572e3980737fed04070c62b7179
3 changes: 2 additions & 1 deletion src/core/crypto/keyless.ts
Original file line number Diff line number Diff line change
@@ -923,7 +923,8 @@ export function getIssAudAndUidVal(args: { jwt: string; uidKey?: string }): {
details: "JWT is missing 'aud' in the payload or 'aud' is an array of values.",
});
}
return { iss: getClaim(jwt, "iss"), aud: getClaim(jwt, "aud"), uidVal: getClaim(jwt, uidKey) };
const uidVal = jwtPayload[uidKey];
return { iss: jwtPayload.iss, aud: jwtPayload.aud, uidVal };
}

/**

Unchanged files with check annotations Beta

let claimVal = "";
let foundStart = false;
for (let i = claimIdx; i < payloadStr.length; i += 1) {
if (payloadStr[i] === '"') {

Check failure on line 70 in src/core/crypto/utils.ts

GitHub Actions / run-tests

Strings must use doublequote
if (foundStart) {
break;
}