Skip to content

[FEATURE] Auth system refactor - Use AWS Cognito #745

@shanthisa

Description

@shanthisa

Is your feature request related to a problem? Please describe.
Currently there is no easy way to onboard users in the app. The admin has to create username and password and send it to the client.

Describe the solution you'd like
We are implementing AWS Cognito as the IAM solution replacing the existing auth system we have. This would involve refactoring the code to use AWS Cognito authorization system for both Mealplanner app as well as admin UI app.

Describe alternatives you've considered
Google social login and Facebook social login. Ran into issues with facebook social login as API is not exposed.
AWS Cognito also allows social login. So at any point we want to implement it, this infrastructure will help do it.

Dev Notes
These requires the following tasks to be done:

  1. Configure AWS Cognito
  2. Setup openid-client on the backend server
  3. When the user wants to login, redirect to the backend api login that should use the OIDC auth code flow
  4. The redirect url on the backend (/api/callback) should verify the JWT token with the pool's JWKS url
  5. The redirect url on the backend (/api/callback) then should set session with the JWT token
  6. After the session is set, it should then redirect back again to the app

Metadata

Metadata

Assignees

Labels

featureA feature request for new functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions