This package has been deprecated

Author message:

This NPM package has been deprecated.

@aws/workbench-core-authentication
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Workbench Core Authentication

main branch coverage

codecov

develop branch coverage

codecov

Description

An authentication service that implements the authorization code grant to handle user authentication. The provided AuthenticationPlugin reference implementation, CognitoAuthenticationPlugin, uses Cognito as the backing IdP.

Usage

Initialization

// Initialize a CognitoAuthenticationPluginOptions object
const cognitoAuthenticationPluginOptions: CognitoAuthenticationPluginOptions = {
  cognitoDomain: '<Cognito Hosted UI Domain>',
  userPoolId: '<Cognito User Pool ID>',
  clientId: '<Cognito User Pool Client ID>',
  clientSecret: '<Cognito User Pool Client Secret>',
  websiteUrl: '<Website URL>'
};

// Create an AuthenticationPlugin instance
const cognitoAuthenticationPlugin = new CognitoAuthenticationPlugin(cognitoAuthenticationPluginOptions);

// Create an AuthenticationService instance
const authenticationService = new AuthenticationService(cognitoAuthenticationPlugin);

Integration with Express

Documentation on integrating AuthenticationService with Express can be found here.

Extending AuthenticationService

AuthenticationService provides one AuthenticationPlugin reference implementation called CognitoAuthenticationPlugin that uses Cognito as the Identity Provider (IdP). Cognito can integrate with any OIDC compatible external IdP, but if another primary IdP is required, a custom AuthenticationPlugin can be created. A user-provided plugin must implement the AuthenticationPlugin interface.

Readme

Keywords

none

Package Sidebar

Install

npm i @aws/workbench-core-authentication

Weekly Downloads

6

Version

1.0.0

License

Apache-2.0

Unpacked Size

194 kB

Total Files

71

Last publish

Collaborators

  • ma-foundation
  • rsmayda
  • wwps-psh-dev