Skip to content

Account Management

The account module provides comprehensive account management including personal info, security, sessions, work hours, and subscription management.

Module path: src/lib/modules/account/ Route: /account

  • Drag-and-drop upload
  • Interactive crop and position adjustment (drag to reposition, scroll to zoom)
  • Supported formats: JPEG, PNG, GIF (max 5MB)
  • Scale and position saved to user document
  • Firebase Storage integration with progress tracking
  • Display Name (required)
  • Username with rate limiting (3 changes per 30 days)
  • Language selector
  • Timezone selector
  • Country/Location selector
  • Username change confirmation dialog with remaining changes counter
  • Current password verification
  • New password with 5-level strength indicator
  • Password confirmation matching
  • Forgot password option (sends email reset)
  • Auto logout after 5 seconds post-change
  • Email update with validation
  • Uniqueness check
  • Not available for Google/OAuth-only accounts
  • Auto logout after change for security
  • View active sessions across devices
  • Session status: online / away / offline
  • Device information: browser, OS, timezone
  • Last seen timestamps
  • “Log out all sessions” button
  • Session details modal
  • Cloud function: revokeAllUserSessionsCallable
  • Default schedule: Mon-Fri, 9am-4pm
  • Custom schedule option
  • Multiple time slots per day
  • Add/remove time slots per day
  • Day-based configuration (mon-sun)
  • Plan name and status badge
  • Storage limit display
  • Monthly price
  • Billing period dates
  • Upgrade link for free users
  • Stripe customer portal integration
  • Danger zone with warning
  • Password confirmation (except OAuth users)
  • Permanent and irreversible
  • Uses firekitAuth.deleteAccount()
  • Auto redirect to sign-in

File: src/lib/modules/account/schemas/personal-info.ts

personalInfoSchema = {
displayName: string // required, non-empty
userName: string // required, non-empty
location: string // required
timeZone: string // required
language: string // required
}
ComponentPurpose
avatar.svelteAvatar upload and adjustment
cover-photo.svelteCover photo management
personal-info.sveltePersonal details form
password-change.sveltePassword update with strength meter
email-user.svelteEmail change
sessions.svelteSession management
work-hours.svelteWork schedule setup
current-subscription.sveltePlan display
delete-account.svelteAccount deletion
two-step-verification.svelte2FA settings
disable-ads.svelteAd preferences
log-out-sessions.svelteBulk session logout
ComponentPurpose
current-plan.svelteActive plan details
billing-header.svelteBilling page header
billing-history.svelteInvoice history
payment-methods.svelteSaved cards
manage-cards-dialog.svelteCard management
card-form-dialog.svelteAdd new card
gift-dialog.svelteGift subscription
view-method.sveltePayment method details