-
Notifications
You must be signed in to change notification settings - Fork 60
feat: add TOTP MFA support and improve Auth test coverage #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
…s for better readability
…ration and serialization
…d project configurations
Coverage Report✅ Coverage 70.66% meets 40% threshold Coverage: 70.66% Minimum threshold: 40% |
…oll fraud protection in tenant config - Introduce RecaptchaAction, RecaptchaKeyClientType enums, RecaptchaManagedRule, RecaptchaTollFraudManagedRule, and RecaptchaKey classes - Extend RecaptchaConfig to support managedRules, recaptchaKeys, useSmsBotScore, useSmsTollFraudProtection, and smsTollFraudManagedRules - Update serialization, deserialization, and validation logic for new fields - Enhance tests to cover new reCAPTCHA config features - Update request handler to map new reCAPTCHA config fields
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## next #114 +/- ##
=======================================
Coverage ? 70.20%
=======================================
Files ? 67
Lines ? 4829
Branches ? 0
=======================================
Hits ? 3390
Misses ? 1439
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR adds TOTP multi-factor authentication support and improves Auth test coverage with better error handling.
What changed
• TOTP Multi-Factor Authentication: Added support for TOTP MFA with configuration and serialization
• Session Cookie Improvements: Refactored
createSessionCookieto useSessionCookieOptionsfor better type safety• Fixed error code consistency: use
invalidUidinstead ofinvalidProviderUidingetAccountInfoByFederatedUidfor better semantic accuracy• Improved JWT decode exception handling in
verifySessionCookie• Fixed session cookie JWT exceptions and integer division issues
• Added comprehensive unit and integration tests for Auth methods including
verifyIdToken,verifySessionCookie,updateUser,updateProviderConfig, andgetUserByProviderUid• Improved test patterns with production-safe helpers and emulator safety checks
• Fixed Dart analysis type inference warnings by adding explicit type arguments
• Improved
AuthProviderConfigsealed class usage to fix casting errors• Refactored
toGoogleCloudIdentitytoolkitV1MfaFactormethods for better readability