Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
9064224
refactor: create services files for further SoC
Zaiidmo Jan 21, 2026
1c674fb
refactor: update authKit Module to not ever call any db, and delete c…
Zaiidmo Jan 21, 2026
072c1b5
refactor: create repositories files for further SoC
Zaiidmo Jan 21, 2026
7e26f30
refactor: create proper package json file #deleted unnecessary matters
Zaiidmo Jan 21, 2026
0d4e691
refactor: update database models and packages configs
Zaiidmo Jan 21, 2026
cebc953
refactor: create DTOs files
Zaiidmo Jan 21, 2026
466ed8f
refactor: update register dto
Zaiidmo Jan 21, 2026
8d99d8d
refactor: remove business logic from auth controller
Zaiidmo Jan 21, 2026
a68656e
refactor: update user model
Zaiidmo Jan 21, 2026
901b9bc
refactor: create an auth business logic service file
Zaiidmo Jan 21, 2026
99356dd
refactor: create user repository file, for db interaction;
Zaiidmo Jan 21, 2026
fe24559
refactor: add alias paths to tsconfig
Zaiidmo Jan 21, 2026
6dfb884
refactor: create mail service
Zaiidmo Jan 21, 2026
80134e1
refactor: update authservice and remove all client references from th…
Zaiidmo Jan 21, 2026
b18bf55
refactor: Update the authentication guard, and wiring new implementat…
Zaiidmo Jan 22, 2026
afd7672
refactor: create admin user-management controller
Zaiidmo Jan 22, 2026
b71395b
refactor: delete duplicated auth middleware
Zaiidmo Jan 22, 2026
cf3fc2f
refactor: create user-management repository
Zaiidmo Jan 22, 2026
3b3f684
refactor: create user-management admin servie
Zaiidmo Jan 22, 2026
b824734
refactor: create role-update dto
Zaiidmo Jan 22, 2026
4c6289e
refactor: separating DTOs folder, create roles&permissions DTOs
Zaiidmo Jan 22, 2026
be490a7
refactor: create roles & permissions HTTP controllers
Zaiidmo Jan 22, 2026
6fdc267
refactor: create roles & permissions Repositories
Zaiidmo Jan 22, 2026
2ab5999
refactor: delete unnecessary unused files
Zaiidmo Jan 22, 2026
0d243aa
refactor: create role middleware and admin decorator, alongside defau…
Zaiidmo Jan 22, 2026
bd13dfa
refactor: create roles & seed services, and update user roles
Zaiidmo Jan 22, 2026
8d847fc
refactor: delete password reset controller, create roles & permission…
Zaiidmo Jan 22, 2026
080db87
refactor: update role dto
Zaiidmo Jan 22, 2026
87e9c7e
refactor: updated roles repository
Zaiidmo Jan 22, 2026
eecf66b
refactor: wiring updates in authkitModule and exporting needed export…
Zaiidmo Jan 22, 2026
1e8f2e6
refactor: delete db config (unneded), and setting up default role ass…
Zaiidmo Jan 22, 2026
91c58d0
refactor: create admin guard and update the service and decorator
Zaiidmo Jan 22, 2026
09643dc
refactor: wiring and exporting new admin service & guard
Zaiidmo Jan 22, 2026
91a465e
refactor: exporting admin providers in auth kit module, updated env v…
Zaiidmo Jan 22, 2026
2a1fbd4
refactor: removing unnecessary types
Zaiidmo Jan 22, 2026
a974a67
refactor: created oAuth Service
Zaiidmo Jan 22, 2026
e53a1ee
refactor: added OAuth endpoints for all providers
Zaiidmo Jan 22, 2026
7261bbb
refactor: updated passport strategy
Zaiidmo Jan 22, 2026
6824de3
updated authentication middleware and auth controller with OAUth endp…
Zaiidmo Jan 22, 2026
2167a1c
created oauth service and updated auth service
Zaiidmo Jan 22, 2026
d288018
wiring all new implementations into authkit module
Zaiidmo Jan 22, 2026
c680adb
doc: update readme file
Zaiidmo Jan 22, 2026
e938792
refactor: Secure auth routes
Zaiidmo Jan 25, 2026
d68c293
refactor: register oAuth Strategy once the module in init
Zaiidmo Jan 25, 2026
73cc584
refactor: create a new .envexample
Zaiidmo Jan 25, 2026
b9bc533
refactor: fix build errors withing typescript stricts
Zaiidmo Jan 25, 2026
5f15b10
refactor: fix dependencies misInstallation
Zaiidmo Jan 25, 2026
feaf388
refactor: update userModel to pass null PhoneNumberValues
Zaiidmo Jan 25, 2026
5f82cd9
refactor: update user repository to have a proper password finding me…
Zaiidmo Jan 25, 2026
8b486bb
refactor: enhance auth service for login paths
Zaiidmo Jan 25, 2026
67cb444
refactor: fix peerDependencies issues
Zaiidmo Jan 26, 2026
3009800
refactor: Update OAuth strategies
Zaiidmo Jan 26, 2026
df70473
refactor: adjust the auth controller and models for OAuth fix
Zaiidmo Jan 26, 2026
2e74eee
DOC: Update Readme documentation#
Zaiidmo Jan 26, 2026
391fcac
fixing merge conflicts from Master branch
Zaiidmo Jan 26, 2026
7cd8cbb
refactor: update user model to contain new fields, and omitting usern…
Zaiidmo Jan 26, 2026
78d9fac
refactor: update user model to contain new fields, and omitting usern…
Zaiidmo Jan 26, 2026
3bea46f
feat: implement comprehensive error handling system
Zaiidmo Jan 27, 2026
a78c64c
Merge branch 'develop' of github.com:CISCODE-MA/AuthKit into develop
Zaiidmo Jan 27, 2026
d7dd80a
Fix merge conflicts
Zaiidmo Jan 27, 2026
3bcb6cc
chore create new user service funcion to retrieve user data
Zaiidmo Jan 28, 2026
c4ab64e
chore: added users `me` end point
Zaiidmo Jan 28, 2026
a05eed2
docs: updated README doc for new endpoint implementation
Zaiidmo Jan 28, 2026
b11b921
Pull master remote branch
Zaiidmo Jan 30, 2026
a419adb
docs(workflow): add Git Flow and npm version requirements (#6)
Zaiidmo Jan 31, 2026
550d890
docs: translate italian text to english and add comprehensive documen…
Zaiidmo Jan 31, 2026
79e2cdf
1.5.1
Zaiidmo Jan 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
195 changes: 159 additions & 36 deletions .github/copilot-instructions.md

Large diffs are not rendered by default.

185 changes: 185 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# Changelog

All notable changes to the AuthKit authentication library will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

---

## [1.5.0] - 2026-01-31

### Added

- Full API documentation in README with request/response examples
- Complete Copilot development instructions for module maintainers
- Contribution guidelines with module-specific setup instructions
- Enhanced SECURITY.md with vulnerability reporting procedures
- Troubleshooting and FAQ sections in documentation
- TypeScript type definitions for all public APIs

### Changed

- Improved error handling and error message consistency
- Enhanced JWT payload structure documentation
- Optimized admin route filtering capabilities
- Updated CONTRIBUTING.md with module-specific requirements

### Fixed

- Translation of Italian text in Copilot instructions to English
- JWT refresh token validation edge cases
- Admin decorator permission checking

### Security

- Added security best practices section to documentation
- Documented JWT secret rotation procedures
- Enhanced password reset token expiration guidelines

---

## [1.4.0] - 2026-01-15

### Added

- Support for Facebook OAuth provider
- Microsoft Entra ID OAuth with JWKS verification
- Role-based permission management system
- Admin routes for user, role, and permission management
- User banning/unbanning functionality

### Changed

- Refresh token implementation now uses JWT instead of database storage
- Password change now invalidates all existing refresh tokens
- User model now supports optional jobTitle and company fields

### Fixed

- OAuth provider token validation improvements
- Email verification token expiration handling
- Microsoft tenant ID configuration flexibility

---

## [1.3.0] - 2025-12-20

### Added

- Email verification requirement before login
- Password reset functionality with JWT-secured reset links
- Resend verification email feature
- User profile endpoint (`GET /api/auth/me`)
- Account deletion endpoint (`DELETE /api/auth/account`)
- Auto-generated usernames when not provided (fname-lname format)

### Changed

- Authentication flow now requires email verification
- User model schema restructuring for better organization
- Improved password hashing with bcryptjs

### Security

- Implemented httpOnly cookies for refresh token storage
- Added password change tracking with `passwordChangedAt` timestamp
- Enhanced input validation on all auth endpoints

---

## [1.2.0] - 2025-11-10

### Added

- JWT refresh token implementation
- Token refresh endpoint (`POST /api/auth/refresh-token`)
- Automatic token refresh via cookies
- Configurable token expiration times

### Changed

- Access token now shorter-lived (15 minutes by default)
- Refresh token implementation for better security posture
- JWT payload structure refined

### Fixed

- Token expiration validation during refresh

---

## [1.1.0] - 2025-10-05

### Added

- Google OAuth provider integration
- OAuth mobile exchange endpoints (ID Token and Authorization Code)
- OAuth web redirect flow with Passport.js
- Automatic user registration for OAuth providers

### Changed

- Authentication controller refactored for OAuth support
- Module configuration to support multiple OAuth providers

### Security

- Google ID Token validation implementation
- Authorization Code exchange with PKCE support

---

## [1.0.0] - 2025-09-01

### Added

- Initial release of AuthKit authentication library
- Local authentication (email + password)
- User registration and login
- JWT access token generation and validation
- Role-Based Access Control (RBAC) system
- Admin user management routes
- Email service integration (SMTP)
- Host app independent - uses host app's Mongoose connection
- Seed service for default roles and permissions
- Admin decorator and authenticate guard

### Features

- Local auth strategy with password hashing
- JWT-based authentication
- Role and permission models
- Default admin, user roles with configurable permissions
- Email sending capability for future notifications
- Clean Architecture implementation
- Production-ready error handling

---

## Future Roadmap

### Planned for v2.0.0

- [ ] Two-factor authentication (2FA) support
- [ ] API key authentication for service-to-service communication
- [ ] Audit logging for security-critical operations
- [ ] Session management with concurrent login limits
- [ ] OpenID Connect (OIDC) provider support
- [ ] Breaking change: Restructure module exports for better tree-shaking
- [ ] Migration guide for v1.x → v2.0.0

### Planned for v1.6.0

- [ ] Rate limiting built-in helpers
- [ ] Request signing and verification for webhooks
- [ ] Enhanced logging with structured JSON output
- [ ] Support for more OAuth providers (LinkedIn, GitHub)

---

## Support

For version support timeline and security updates, please refer to the [SECURITY.md](SECURITY) policy.

For issues, questions, or contributions, please visit: https://github.com/CISCODE-MA/AuthKit
Loading