A minimal implementation of a web frontend integrated with Amazon Cognito hosted UI
MIT License
This is a minimal implementation of a web frontend, integrated with Amazon Cognito hosted UI using Amazon Cognito Auth SDK for JavaScript. AWS Amplify provides such integration as well but has a learning curve on its own.
The application shows the currently signed in user, otherwise automatically redirects to sign in. Once the user is signed in, the application generates a unique client ID for the user. Then it calls the API every second with client ID in 'id' query parameter and Amazon Cognito ID token in Authorization header. That flow mimics application that needs to periodically refresh data for a logged in user.
For now, to make the code fully functional, you need to: