Skip to content

Minimal AWS Cognito authentication SRP workflow implementation, replacing outdated cognito-identity-js

License

Notifications You must be signed in to change notification settings

serverlesspub/cognito-ergo-sum

Repository files navigation

Cognito Ergo Sum

Minimal AWS Cognito authentication Secure Remote Password (SRP) implementation, replacing the outdated amazon-cognito-identity-js library, with the goal of only depending on AWS JS Client SDK, and providing a minimal, focused library for web sites that want to integrate Cognito authentication.

Extracted from and inspired by AWS Amplify JS, but without all the other stuff that Amplify brings along.

Developed by AWS Heroes Slobodan Stojanović and Gojko Adzic.

Status

Work in progress - basic username/password authentication works, but custom flows are not yet supported.

Differences from amazon-cognito-identity-js and Amplify JS

  • minimal dependencies - the only runtime dependency is AWS Cognito IDP SDK
  • focuses only on the authentication flow, without bundling in token caching, UI widgets...
  • uses JS platform BigInt object, widely available in all modern browsers, instead of the legacy BigInteger implementation from JSBN
  • uses a much faster method for modPow (completes at 20% time compared to legacy BigInteger, 8% of time compared to standard BigInt methods)

About

Minimal AWS Cognito authentication SRP workflow implementation, replacing outdated cognito-identity-js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published