Google Sign-In Required

Use your company Google account to access the BetterFleet private content.

Back to private home

BetterFleet Support Private
Skip to content
BetterFleet Dev Wiki
0003 - AWS Amplify for Authentication
Initializing search
    bf-dev
    • Home
    • Product Capabilities
    • Process
    • Current Work
    • System Design
    • Software Reference
    • Operations
    bf-dev
    • Home
      • Overview
      • Manage
      • Overview
      • Product Engineering Workflow
      • Product Engineering Delivery
      • Product Engineering Workflow in Linear
        • GitLab Feature Flags
        • In-App Docs Authoring
        • Release Notes
      • Templates
      • Publishing
      • Workflow Companions
      • Overview
      • Active Artifacts
      • Backlog Artifacts
      • Archived Artifacts
      • Overview
      • Microgrid
      • OSCP
        • Challenge
        • Specification
        • Spec
        • Architecture
        • Overview
        • Script Runtime Model
        • Compose Profiles and Modes
        • Repo Topology
        • CI and Release Integration
        • Overview
        • Internal Application Diagrams
          • Overview
          • Web Model
          • Core Model
        • Service Interaction Flows
        • Data and State
          • Index
          • bf-manage-web
          • bf-manage-core
          • bf-manage-connect
          • bf-manage-sitepwrmon
          • bf-manage-incidents
          • bf-telematics
          • bf-depot-sim
          • bf-manage-roaming
          • bf-support-microsite
          • bf-digital-twin
          • bf-schedule-creator
        • Overview
        • Internal Application Diagrams
        • Migration and Flags
        • Simulation Request Lifecycle
          • Index
          • bf-bnl-ui
          • bf-bnl-settings
          • bf-bnl-schedule-analysis-compute
          • bf-route-modelling
          • bf-schedule-creator
          • bf-digital-twin
        • Overview
        • Secrets and Env Strategy
        • Vendors and Local Dependencies
        • ADRs
        • Service Matrix
        • Cloud Dependencies
        • Ports and URLs
      • Onboarding
      • Daily Operations Runbook
        • Overview
        • Staging Hotfix Release
        • Production Hotfix Release
        • Terraform Plan Dry Runs
      • Troubleshooting
      • Testing Guide
    • Date
    • Status
    • Context
    • Decision
    • Consequences

    0003 - AWS Amplify for Authentication¶

    Date¶

    2022-05-27

    Status¶

    Accepted

    Context¶

    Authentication behaviour is written with custom code, and requires reasonably low level understanding of React to implement including context providers and custom hooks. We want a way to authenticate front-end users in the most maintainable and secure way possible.

    Decision¶

    We will refactor the current front-end auth framework to use AWS Amplify Auth.

    Consequences¶

    Positive Consequences: Refactoring to an Amplify authentication flow drastically reduces the amount of code that needs to be maintained by Evenergi developers. This provides more time to work on core feature development and also reduces the maintenance and security risks associated with in-house authentication code.

    Using Amplify is also a transition made easier because of our current use of a Cognito backend authentication server as specified in 0002 - Cognito for Authentication and Authorisation.

    In the future, having a fully-fledged design system will be important to the consistent and quick development of frontend behaviour. Amplify comes with a built-in design system and component library for easy use. We imagine that this will incur significant reductions to the creation time for new UI elements.

    Negative Consequences: Amplify itself is a relatively large library. This means that the bundle size of the frontend application may increase in size compared to a custom-code auth strategy. However, the bundle size can be reduced through multiple strategies such as smart importing.

    The ability to migrate easily to a different cloud service provider may require more effort than a native auth implementation because of the intrinsic link between Amplify and AWS.

    Made with Material for MkDocs