Email & Password Login
Feature Detail
Description
Provides the foundational authentication mechanism allowing users to register and sign in using an email address and password. This is the baseline login method required for MVP launch across all user roles. The system issues JWT access and refresh tokens upon successful authentication, which are stored securely on-device using platform keychain or keystore mechanisms. Password policies enforce minimum security standards, and the flow supports password reset via email.
User Flow
Analysis
Email and password login is the universal fallback authentication method that ensures every user can access the platform regardless of whether they have BankID or Vipps. Without this, MVP launch would be blocked entirely since BankID and Vipps are Phase 2 features. It also serves as the admin portal authentication method for coordinators and org admins who primarily use desktop browsers. Providing a reliable, low-friction baseline login builds trust with early adopters and allows the platform to onboard users during the pilot phase without depending on third-party identity providers.
Implemented via a REST API endpoint on the Next.js backend using bcrypt for password hashing and JWT for token issuance. The Flutter client stores access and refresh tokens in the platform keychain (iOS Keychain via flutter_secure_storage, Android Keystore). Token refresh logic runs silently in the background using an HTTP interceptor (Dio). The admin portal uses HTTP-only cookies for session management instead of localStorage. Password reset uses a time-limited signed token sent via email. Rate limiting and brute-force protection must be applied at the API layer. The auth flow uses a BLoC for state management in the mobile app.
Components (114)
Shared Components
These components are reused across multiple features
User Interface (12)
Service Layer (34)
Data Layer (22)
Infrastructure (38)
User Stories
No user stories have been generated for this feature yet.