Skip to content

Firebase account and authentication route modules for `@aegisjsproject/router`

License

AegisJSProject/firebase-account-routes

@aegisjsproject/firebase-account-routes

Firebase account and authentication route modules for @aegisjsproject/router

CodeQL Node CI Lint Code Base

GitHub license GitHub last commit GitHub release GitHub Sponsors

npm node-current npm bundle size gzipped npm

GitHub followers GitHub forks GitHub stars Twitter Follow

Donate using Liberapay

Firebase Account Routes for @aegisjsproject/router

This project provides modular, event-driven authentication and account management routes for web applications using Firebase and @aegisjsproject/router. It enables seamless integration of sign-in, sign-up, password reset, email verification, and profile management features, with each route implemented as a separate, dynamically loaded module.

Features

  • Modular Routing: Each account-related route (sign-in, sign-up, reset-password, verify-email, verify-reset, profile) is a standalone ES module, loaded on demand.
  • Event-Driven Architecture: Custom events are dispatched for account actions, enabling flexible cross-component communication.
  • Firebase Integration: Uses Firebase JS SDK for authentication flows. Modules preload required Firebase packages for optimal performance.
  • UI Rendering: Uses tagged template literals (html) for declarative UI construction.

How It Works

  • The main entry (main.js) dispatches requests to the correct route module based on the requested page, using the ROUTES map from consts.js.
  • Route modules handle their own UI, event registration, and Firebase logic.
  • Events and navigation are managed via @aegisjsproject/router and @aegisjsproject/callback-registry.

Developer Workflow

  • Lint: npm run lint:js (ESLint, config in .github/linters/.eslintrc.yml)
  • Test: npm run test (runs lint and Node.js tests)
  • Start Dev Server: npm start (uses @shgysk8zer0/http-server)
  • Versioning: npm run version:bump[:patch|:minor|:major]

Key Files

  • main.js: Central route dispatcher and title resolver
  • consts.js: Route metadata and event names
  • auth.js, profile.js, sign-in.js, sign-up.js, reset-password.js, verify-email.js, verify-reset.js: Route logic
  • utils.js: User sanitization and module preloading
  • events.js: Event helpers

About

Firebase account and authentication route modules for `@aegisjsproject/router`

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published

Contributors 2

  •  
  •