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

fix typos in comments (only) #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aws/CreateAuthChallenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports.handler = async (event) => {
const challenge = crypto.randomBytes(64).toString('hex');

event.response.publicChallengeParameters = {
credId: JSON.parse(publicKeyCredJSON).id, //credetnial id
credId: JSON.parse(publicKeyCredJSON).id, //credential id
challenge: challenge
};

Expand Down
4 changes: 2 additions & 2 deletions aws/DefineAuthChallenge.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/**
* 1- if user doesn't exist, throw exception
* 2- if CUSTOM_CHALLENGE answer is correct, authentication successful
* 3- if PASSWORD_VERIFIER challenge answer is correct, return custom challeneg (3,4 will be appliable if password+fido is selected)
* 3- if PASSWORD_VERIFIER challenge answer is correct, return custom challenge (3,4 will be appliable if password+fido is selected)
* 4- if challenge name is SRP_A, return PASSWORD_VERIFIER challenge (3,4 will be appliable if password+fido is selected)
* 5- if 5 attempts with no correct answer, fail authentication
* 6- default is to respond with CUSTOM_CHALLENEG --> password-less authentication
* 6- default is to respond with CUSTOM_CHALLENGE --> password-less authentication
* */

exports.handler = (event, context, callback) => {
Expand Down
4 changes: 2 additions & 2 deletions aws/VerifyAuthChallenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ exports.handler = async (event) => {
const challenge = event.request.privateChallengeParameters.challenge;
const credId = event.request.privateChallengeParameters.credId;

//--------publickey information
//--------public-key information
var publicKeyCred = event.request.userAttributes["custom:publicKeyCred"];
var publicKeyCredJSON = JSON.parse(Buffer.from(publicKeyCred, 'base64').toString('ascii'));

//-------get challenge ansower
//-------get challenge answer
const challengeAnswerJSON = JSON.parse(event.request.challengeAnswer);

const verificationResult = await validateAssertionSignature(publicKeyCredJSON, challengeAnswerJSON);
Expand Down
2 changes: 1 addition & 1 deletion public/webauthn-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
]
}

//get sign in credentials from authenticator
//get sign-in credentials from authenticator
const cred = await navigator.credentials.get({
publicKey: signinOptions
});
Expand Down