# v2.0.4

## Bug Fix
1. Fix: Avoided cascade saves during verification
2. Fix: Hardened the Entity Mapping

# v2.0.3

## Bug Fixes
1. Fixed test account verification bug

---

# v2.0.1

## Bug Fixes
1. Fix issue of duplicate key value violates unique constraint error when using google auth

# v2.0.0
## Features & Enhancements
1. **Client-Side Transport Preference**: Introduced the `x-auth-transport` HTTP header. Clients can now explicitly request their preferred token delivery method (e.g., `x-auth-transport: cookie`) during authentication. This prevents auto-magic frontend SDKs from defaulting to Bearer tokens when the backend is configured to support multiple transports (`AuthTransport.BOTH`).

# v1.0.5
## Bug Fixes
1. Fixed bugs in email verification flow
2. Fixed bugs in secure account flow

# v1.0.4
## Prisma Adapter Validation
1. Fixed bugs in Prisma adapter for proper authentication flow

# v1.0.3
## Bug Fixes
1. Fixed bug of test accounts discovery

# v1.0.1
## Changes
1. Changed the source of identifier from `USER_INPUT` to `LOCAL`

# v1.0.0
## Features & Testing Enhancements
1. **Granular OTP Providers Map**: Introduced `otpProviders` in `AuthModuleOptions` to allow specifying different OTP backend implementations per identifier type (e.g., Twilio Verify for phone and `DatabaseOtpProvider` for email), eliminating the need for custom routing classes.
2. **MFA Complete Flow**: Added `POST /auth/mfa/verify` endpoint to allow users to submit TOTP codes and receive session tokens after an `mfaRequired` login response.
3. **Test Accounts**: Added granular `testAccounts` configuration for OTPs to facilitate secure, targeted app store reviews and automated E2E testing without triggering notifications.
4. **Debug Mode OTP**: Enhanced `debugMode` in `AuthModuleOptions` to support a static `defaultOtp` for bypassing delivery logic during local development.

## Breaking Changes
1. **Database Adapters**: Added support for TypeORM, Prisma, and Custom Adapters.

# v0.3.2
## Patch Session Logs Method Signature
Made namespace optional

# v0.3.1
## Fixed Build Issue
Added the missing `SessionLog` entity for successful build

# v0.3.0
## Added Session Log (Optional)
1. Added `createSessionLogOnInvalid` flag to the module config options to enable session logs
[Optional]: Defaults to `false`. Set to `true` if you want session log table and records populated to your database.
2. Also added some methods for session management

# v0.2.2
## Fixed Namespace bug
Fixed token refresh bug which was falsely throwing `Namespace mismatch` error.

# v0.2.1
## Debug in module config options
Added a flag for printing logs to console in debug mode

# v0.2.0
## Force Verification on Google
1. This release splits the Google verification force option into `forceVerificationOnGoogleSignup` and `forceVerificationOnGoogleLogin` in `AuthModuleOptions` for finer control.

## Debug Mode and Default OTP
1. This release adds support for `debugMode` and `defaultOtp` options in `AuthModuleOptions`.

## Deprecations
1. `CookieNameConfig` is deprecated in favour of `AuthContext`
2. `cookieNameResolver` is deprecated in favour of `authContextResolver`

## Features
1. Scoped sessions are now supported. See README.md for more information about this feature
2. Added SessionCreationPolicy for configuring existing session reuse
3. Add support for fetching sessions for a `uid` in `AuthService`

# v0.1.11
## Phone Auth Regex Validation
1. This release fixes an issue where the phone auth regex was not working as expected.

# v0.1.10
## Phone Auth with Internationalized Numbers
1. This release fixed bugs and issues around phone auth and support for internationalized phone numbers.

# v0.1.9
## Cookie Path Configuration
1. This release adds support for configuring the refresh token cookie path via the `refreshTokenPath` option in `AuthModuleOptions`. The default value is now set to '/auth/refresh' instead of '/'.
2. This release adds support for configuring the same-site policy for auth cookies via the `cookieSameSite` option in `AuthModuleOptions`. The default value is now set to 'lax' in production and 'none' in development.
3. This release adds support for explicitly setting the Secure flag on cookies via the `cookieSecure` option in `AuthModuleOptions`. The default value is now set to true in production and false in development. Note that `sameSite` option being set to 'none' automatically sets the Secure flag to true.

---

# v0.1.8
## Extra Data in Signup Event
This release adds support for passing extra data in signup events. The extraData field can be used to pass any additional data that may be needed for other purposes. The extraData field is optional and can be omitted if no extra data is needed.

---

# v0.1.7
## Cookie Dependency Fix
This release addresses `UnknownDependenciesException [Error]: Nest can't resolve dependencies of the AuthCookieService (?). Please make sure that the argument at index [0] is available in the current module.` and fixed the issue.

---

# v0.1.6
## Cookie Scoping
This release adds subdomain-aware cookie scoping for authentication. Cookies are now isolated per subdomain, enabling multiple accounts to be securely maintained in the same browser session across different tenant or vendor domains without session collision.

