Auth application to authenticate several websites and mobile apps.
This is a serverless project using the Serverless framework(sst.dev) and authentication is based on standard JWT token using AWS Amplify and Amazon Cognito.
This app can be integrated with any application supporting oAuth2 and provides Single Sign On(SSO) on all services.
Make sure your local machine has Node.js 16
and npm 7
installed.
yarn install
Install in the project root, frontend/auth-app
, frontend/client-example1
and frontend/client-example2
.
export AWS_ACCESS_KEY_ID="ASIAXQxxx"
export AWS_SECRET_ACCESS_KEY="pgs3CiM8knxxx"
export AWS_SESSION_TOKEN="IQoJb3JpZ2luX2VjExxx"
After the first deployment, add an app client and set up the hosted UI(documentation)
For development purpose, you can set callback URLs as http://localhost:3001
Retrieve app client id and set REACT_APP_USER_POOL_CLIENT_ID
environment variable in frontend/client-example1/.env
and frontend/client-example2/.env
(.env.local
in development mode)
Starts the Live Lambda Development environment.
Run the frontend auth app in development environment.
Run the frontend client app in development environment.
Build your app and synthesize your stacks.
Deploy all your stacks to AWS. Or optionally deploy, a specific stack.
Remove all your stacks and all of their resources from AWS. Or optionally removes, a specific stack.
Runs your tests using Jest. Takes all the Jest CLI options.