Documentation Index
Fetch the complete documentation index at: https://memberpulseptyltd.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Journey Overview
| Attribute | Value |
|---|---|
| Journey ID | UJ-M-001 |
| Actor | Prospective or existing member |
| Goal | Gain authenticated access to the Member Portal |
| Trigger | User navigates to member portal URL or clicks login link |
| Outcome | User is authenticated and redirected to dashboard |
Preconditions
- User has a valid email address
- For SSO: Organization has configured SSO provider (WorkOS)
- For existing members: Account exists in the system
Journey Flow
Detailed Steps
Access Portal
User navigates to the member portal URL (e.g.,
members.organization.com).System Response:- Displays login/register screen
- Shows SSO button if configured for the organization
- Shows email/password form as fallback
Choose Authentication Method
User selects their preferred authentication method:Option A - SSO (if available):
- Click “Continue with [Provider Name]”
- Redirected to identity provider (Google, Microsoft, Okta, etc.)
- Complete authentication with provider
- Redirected back with auth token
- Enter registered email address
- Enter password
- Click “Sign In”
- Click “Create Account” or “Register”
- Proceed to registration flow
System Validates Credentials
For SSO:
- System validates OAuth token from provider
- Matches user to existing account or creates new account
- Retrieves user profile from provider (name, email, avatar)
- System validates email exists
- System validates password hash matches
- Checks account status (active, suspended, locked)
- Invalid credentials → “Invalid email or password”
- Account locked → “Account locked. Contact support.”
- Account suspended → “Account suspended. Contact support.”
Issue Authentication Token
System issues JWT token containing:
- User ID
- Tenant ID (organization)
- Role(s)
- Token expiry
- HTTP-only secure cookie (primary)
- Local storage (refresh token)
New Member Registration Flow
Enter Basic Information
- Email address (required, unique)
- First name (required)
- Last name (required)
- Password (required, min 8 chars, complexity rules)
- Confirm password
Email Verification
- System sends verification email with 6-digit code
- User enters code within 15 minutes
- System marks email as verified
Accept Terms
- User reviews Terms of Service
- User reviews Privacy Policy
- User checks acceptance checkbox
Error Scenarios
| Scenario | System Response | User Action |
|---|---|---|
| Invalid email format | ”Please enter a valid email address” | Correct email |
| Email already registered | ”An account with this email already exists” | Use login or password reset |
| Incorrect password | ”Invalid email or password” | Try again or reset password |
| Account locked (5 failed attempts) | “Account temporarily locked. Try again in 30 minutes.” | Wait or contact support |
| SSO provider error | ”Authentication failed. Please try again.” | Retry or use email/password |
| Email not verified | ”Please verify your email first” | Check inbox for verification email |
| Session expired | Redirect to login page | Re-authenticate |
Password Reset Flow
Security Considerations
- Passwords hashed using bcrypt (cost factor 12)
- Rate limiting: 5 failed attempts = 30-minute lockout
- JWT tokens expire after 24 hours
- Refresh tokens expire after 7 days
- All auth endpoints use HTTPS only
- CSRF protection on all forms
Related Entities
Related Journeys
Acceptance Criteria
Frontend
- Login form with email/password fields
- SSO button displayed when configured
- Registration form with validation
- Email verification code input
- Password reset flow implemented
- Loading states during authentication
- Error messages displayed clearly
- Remember me checkbox (extends session)
Backend
-
POST /api/auth/login- Email/password login -
POST /api/auth/register- New user registration -
POST /api/auth/verify-email- Email verification -
POST /api/auth/forgot-password- Password reset request -
POST /api/auth/reset-password- Password reset completion -
GET /api/auth/sso/{provider}- SSO initiation -
POST /api/auth/sso/callback- SSO callback
Permissions
- Public access to login/register endpoints
- Rate limiting applied to auth endpoints
Business Rules
- Email must be unique per tenant
- Password complexity enforced
- Email verification required before full access
- SSO users cannot set password (SSO-only)
Error Handling
- Generic error for invalid credentials (security)
- Clear messages for account status issues
- Graceful SSO provider failure handling