From 06a916925a625a5d66be5fa2a75de4b79902e792 Mon Sep 17 00:00:00 2001 From: simonmcallister0210 <56324559+simonmcallister0210@users.noreply.github.com> Date: Sat, 25 Mar 2023 17:45:59 +0000 Subject: [PATCH] docs: fixed typos in README and CONTRIBUTING (#14) --- CONTRIBUTING.md | 4 ++-- README.md | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 225d3ce..2fd7748 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,7 @@ This projects follows the Conventional Commit specification (at least for commit https://www.conventionalcommits.org/en/v1.0.0/ -This allows use to categorise changes and make automated updates to our project version and change log based on the categories being merged. For example, if you commit a feature, you could set the commit message to be: +This allows us to categorize changes and make automated updates to our project version and change log based on the categories being merged. For example, if you commit a feature, you could set the commit message to be: ```sh git commit -m 'feat: my new feature' @@ -118,6 +118,6 @@ After all these steps have been completed, you should be able to run integration To release a new major version you must make sure you create a branch for the old major version. For example, if we are on v1, and we plan on releasing a braking change to v2, we must create a new branch for v1 just before we release v2 -After we have this branch old branch (e.g. v1) we need to update the Github workflow files to support GitHub actions for this branch. To do this, first checkout the new branch `git checkout v1` and look for comments in `.github/workflow/*` preceded by 'SUPPORTING OLDER MAJOR VERSIONS'. The comments will tell you what you need to change in order to support the old major version +After we have this old branch (e.g. v1) we need to update the Github workflow files to support GitHub actions for this branch. To do this, first checkout the new branch `git checkout v1` and look for comments in `.github/workflow/*` preceded by 'SUPPORTING OLDER MAJOR VERSIONS'. The comments will tell you what you need to change in order to support the old major version _Update 12/2022_ - BE AWARE - At time of writing the release-please action will always tag a release as 'latest', so if you release on an old major branch you will need to manually re-tag the latest Github release diff --git a/README.md b/README.md index e4e6197..f517653 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ JavaScript helper used to calculate the values required for SRP authentication i If you've ever tried to use the in-built SRP authentication flows in Cognito (USER_SRP_AUTH or CUSTOM_AUTH) using initiateAuth and respondToAuthChallenge, you may have encountered holes in the documentation that don't explain specific fields (SRP_A, TIMESTAMP, PASSWORD_CLAIM_SIGNATURE). You may also notice that there are no SDK functions that will generate values for these fields, leaving you stuck and unable to progress. This helper was created to bridge the missing support for SRP authentication in AWS Cognito, providing functions that will handle the necessary calculations needed to complete the authentication flow -The helper works by providing functions that generate the required hashes for your secret and password, and wrapping your Cogntio request and returning the same request with the required SRP fields +The helper works by providing functions that generate the required hashes for your secret and password, and wrapping your Cognito request and returning the same request with the required SRP fields ## Usage @@ -76,7 +76,9 @@ const respondToAuthChallengeResponse = await cognitoIdentityServiceProvider // . . . return login tokens from respondToAuthChallengeResponse ``` -## Should you worry about 0 being used during the SRP calculations? +## Zero values in SRP + +Should you worry about 0 being used during the SRP calculations? Short answer: no! @@ -175,7 +177,7 @@ Wraps a [InitiateAuthRequest](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/la --- -### `respondToAuthChallenge` +### `wrapAuthChallenge` Wraps a [RespondToAuthChallengeRequest](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cognito-identity-provider/modules/respondtoauthchallengerequest.html) and attaches the PASSWORD_CLAIM_SECRET_BLOCK, PASSWORD_CLAIM_SIGNATURE, and TIMESTAMP fields required to complete SRP @@ -183,7 +185,7 @@ Wraps a [RespondToAuthChallengeRequest](https://docs.aws.amazon.com/AWSJavaScrip `session` - _SrpSessionSigned_ - A signed version of the SRP session object -`request` - [_RespondToAuthChallengeRequest_](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cognito-identity-provider/modules/respondtoauthchallengerequest.html) - The Cognito request passed into initiateAuth +`request` - [_RespondToAuthChallengeRequest_](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cognito-identity-provider/modules/respondtoauthchallengerequest.html) - The Cognito request passed into respondToAuthChallenge **Returns**: