react-serverless-auth

1.5.0 • Public • Published

React Authentication Components using AWS Cognito

Build Status Coverage Status dependencies Status npm version Maintainability Test Coverage

Try react-serverless-auth on CodeSandbox

Installation

$ yarn add react-serverless-auth
or
$ npm install --save react-serverless-auth

Configuration

To simplify the integration with create-react-app the package uses environment variables as described in the create-react-app documentation. The environment variables are handled using dotenv by default.

Amazon Cognito User Pool

To use the react-serverless-auth components you need to create an Amazon Cognito User Pool from the AWS Console for Cognito User Pools or using the create-user-pool command in the AWS CLI.

IMPORTANT: When creating the App, the generate client secret box must be unchecked because the JavaScript SDK doesn't support apps that have a client secret.

The User Pool ID and Client ID are specified in the following environment variables:

REACT_APP_COGNITO_USER_POOL_ID
REACT_APP_COGNITO_CLIENT_ID

Authentication URLs

The authentication endpoint URLs are configurable and the following default values are pre-defined in src/routes.js:

REACT_APP_AUTH_LOGIN_URL=/auth/login
REACT_APP_AUTH_CONFIRM_URL=/auth/confirm
REACT_APP_AUTH_REGISTER_URL=/auth/register
REACT_APP_AUTH_RESET_URL=/auth/reset

Contributing

See CONTRIBUTING.md.

Technology Stack

Dependencies

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.5.00latest

Version History

VersionDownloads (Last 7 Days)Published
1.5.00
1.4.20
1.4.10
1.4.00
1.3.20
1.3.10
1.3.00
1.2.00
1.1.10
1.1.00
1.0.80
1.0.70
1.0.60
1.0.51
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i react-serverless-auth

Weekly Downloads

1

Version

1.5.0

License

MIT

Unpacked Size

13.2 MB

Total Files

68

Last publish

Collaborators

  • stanchino