Skip to content

Commit

Permalink
docs: fixed typos in README and CONTRIBUTING (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmcallister0210 authored Mar 25, 2023
1 parent 50d06d2 commit 06a9169
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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!

Expand Down Expand Up @@ -175,15 +177,15 @@ 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

**Parameters**:

`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**:

Expand Down

0 comments on commit 06a9169

Please sign in to comment.