bcgov / cognito-example-apps

A simple client application that can be used to test an app client in the BC Gov Cognito SSO Shared Service
Apache License 2.0
0 stars 2 forks source link
bcgov-sso citz

cognito_example_client_app

Lifecycle:Stable

This repository contains client applications that can be used to test an app client in the BC Gov Cognito SSO Shared Service.

Next-App

An example Next.js application to connect to Cognito App client without 3rd party library or wrapper.

How to run

  1. Go to examples/next-app.
  2. Copy .env.example to .env.local,
  3. Set environment variables in .env.local.
  4. Run the development server:
    yarn install
    yarn dev
  1. Go to examples/next-app
  2. Copy .env.example to .env,
  3. Set environment variables in .env.
  4. Run the docker-compose file:
    docker-compose up

Next-App-JWT

An example Next.js application to connect to Cognito App client using JWT (JSON Web Token).

Next-App-Openid

An example Next.js application to connect to Cognito App client using openid-client, which is a server side OpenID Relying Party.

React-App-Amplify

This is an example React.js application to connect to Cognito App client on client side using Amplify library.

How to run

  1. Go to examples/react-app-amplify.
  2. Copy src/aws-exports.js.sample to src/aws-exports.js,
  3. Set values in src/aws-exports.js.
  4. Run the development server:
    yarn install
    yarn start
  1. Go to examples/react-app-amplify.
  2. Copy src/aws-exports.js.sample to src/aws-exports.js,
  3. Set values in src/aws-exports.js.
  4. Run the docker-compose file:
    docker-compose up

Next-App-PKCE

An example React.js application to connect to Cognito App client respecting OAuth 2.0 Authorization Code with PKCE Flow.

How to Contribute

If you would like to contribute, please see our CONTRIBUTING guidelines.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

Apache-2.0 License