-
-
Notifications
You must be signed in to change notification settings - Fork 878
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
feat: Add support for login with additional auth data #1848
base: master
Are you sure you want to change the base?
Conversation
Thanks for opening this pull request!
|
Could you please add a test? |
Codecov ReportAttention: 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. |
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 |
New Pull Request Checklist
Issue Description
Login with additional
authData
to allow multi-factor authentication (MFA).Closes: #1839
Approach
A
logInWithUsernameInBackground
function is added that takes additionalauthData
.In order to prevent the SDK from passing the
mfa
object when saving the user the_convertToDictionaryForSaving
function was updated to exclude themfa
object.The login function can be called like this:
PFUser.logInWithUsername(inBackground: username, password: password, authData: ["mfa": ["token": authCode]])
TODOs before merging