TOE Engineering Presentation Series/Cognito Auth: Borrower UI & Borrower-Auth-UI

Auth Overview

Two auth flows, one server-side session.

ℹ️
Shared Flask Session — both paths converge on one session carrying borrower identity, company context, and loan file.
ℹ️
Each company has its own Cognito pool — multi-tenant isolation at the auth layer

Inline Signup Bridges Cognito to Session

Inline signup: collect, register, verify, sign in.

Session Establishment Handles Three Cases

How the server resolves a Cognito token into a borrower session.

Source Files
Lookupapp/borrower/auth/views.py:1070-1072
Invite handlerapp/borrower/auth/views.py:334-431
Creationapp/borrower/auth/views.py:1084-1097
Error recovery: session errors retry automatically, general errors restart the flow
ℹ️
Borrower UI has no MFA — signup flow only. MFA lives entirely in the legacy auth portal.

Legacy Auth Handles Sign-in, MFA, and Recovery

Server-side auth with MFA, recovery, and invitation flows.

Source Files
Sign in pageborrower-auth-ui/src/routes/signin.tsx
API callborrower-auth-ui/src/api/signin.ts
Backendapp/borrower/auth/views.py:98
Challenge UIborrower-auth-ui/src/routes/code-challenge.tsx
MFA backendapp/borrower/auth/views.py:593-831
Setup UIborrower-auth-ui/src/routes/mfa-options.tsx
ℹ️
Also handles invitation signup, forgot password, and password reset flows

Auth Consolidation Is Underway

Migration status: signup done, the rest is pending.

The legacy portal has zero test coverage — every ported route needs new tests written during migration
Navigation

Keyboard Shortcuts

→ / Space
Next slide / reveal fragment
Previous slide / hide fragment
Home / End
First / last slide
F
Toggle fullscreen
?
Toggle this help
Esc
Close help
Comments