feat: Add support for login with additional auth data#1848
feat: Add support for login with additional auth data#1848SteffenKeller wants to merge 3 commits into
Conversation
Thanks for opening this pull request!
|
|
Could you please add a test? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1848 +/- ##
===========================================
+ Coverage 64.24% 82.98% +18.74%
===========================================
Files 201 282 +81
Lines 23233 30844 +7611
===========================================
+ Hits 14926 25596 +10670
+ Misses 8307 5248 -3059 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Yes added tests now |
|
Restarted CI... |
|
Is there a way to prevent the SDK from sending the mfa object in authData when saving the user without changing the Saving the user with MFA enabled will send the following to the server: This will not be successful because Parse Server is calling To fix this and also allow setting up mfa I could update the |
|
Not sure, @parse-community/ios-sdk |
|
Closing this as I found a better implementation in #1858 |
New Pull Request Checklist
Issue Description
Login with additional
authDatato allow multi-factor authentication (MFA).Closes: #1839
Approach
A
logInWithUsernameInBackgroundfunction is added that takes additionalauthData.In order to prevent the SDK from passing the
mfaobject when saving the user the_convertToDictionaryForSavingfunction was updated to exclude themfaobject.The login function can be called like this:
PFUser.logInWithUsername(inBackground: username, password: password, authData: ["mfa": ["token": authCode]])TODOs before merging