/aws-cognito-oidc-sample

How to Implement Passkeys and Descope Flows with a Cognito IdP using OpenID Connect

Primary LanguageJavaScript

AWS Cognito with Descope in Hosted UI Sample App

Description

This is a very simple react app to demonstrate how to implement Descope as an OIDC provider with Cognito by using AWS Amplify.

Note: If you need the flow, to work with OIDC and Passkeys, it is the oidc-flow.json file in the root of this directory. This can be downloaded and imported via the Descope Console.

Project Setup

  1. Create .env for env variables;
REACT_APP_USERPOOL_ID=<region>_<id>
REACT_APP_USERPOOL_WEB_CLIENT_ID=<user pool client ID>
REACT_APP_AWS_REGION=<region>
REACT_APP_COGNITO_HOSTED_UI=<url of hosted UI>
REACT_APP_COGNITO_DOMAIN=<cognito domain>
REACT_APP_DESCOPE_PROJECT_ID=<Descope Project ID from Descope Console>

Note: This app uses the AWS Hosted UI, so it can be easily re-configured. The app would operately similarly however if a custom login page was used instead.

  1. Install all of the packages

You can install all of the necessary packages by running yarn install

Run

Run the program using:

yarn start

Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section.

Author

Descope

License

This project is licensed under the MIT license.