Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental frontend and Cognito user domain #21

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

eoinsha
Copy link
Collaborator

@eoinsha eoinsha commented Feb 26, 2024

This PR adds a number of suggested changes.
This is a Work in Progress

  1. A custom domain is used for the Cognito hosted domain (auth.<DOMAIN>)
  2. Support for sending user invitations and reset passwords with Mailgun, using a Cognito custom Lambda sender
  3. A skeleton frontend Next.js application is added with Login, Reset Password and Invitation support
  4. A CloudFront distribution is added to host the UI on the primary domain
  5. Since the primary domain is now used for the UI, the /auth and /.share domains are hosted in a api. subdomain

TO DO:

  • Add docs on user create/remove and invitation flow
  • Add more unit tests
  • Style Cognito hosted UI
  • Integrate hosted UI into React frontend with confirmation UI to start and better "finished" page
  • Sort out routing on UI - the CloudFront-hosted version is forcing a redirect to /login when not desired
  • Add a better Home page in the UI

import middySsm from '@middy/ssm'
import encryptionSdk from '@aws-crypto/client-node'
const { BASE_URL, STAGE, KEY_ALIAS, KEY_ARN } = process.env
const EMAIL_DOMAIN = 'sandbox4e5d8a28162548389a95edc71719a3a4.mailgun.org'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will change this to a proper from: domain when I set up Mailgun with this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant