Skip to content

Support for Login with additional authData #1839

Open
@SteffenKeller

Description

@SteffenKeller

New Feature / Enhancement Checklist

  • I am not disclosing a vulnerability.
    I am not just asking a question.
    I have searched through existing issues.

Current Limitation

This SDK does currently not support login with additional authData introduced in Parse Server 6 (8156) which is needed to support multi-factor authentication (MFA).

Feature / Enhancement Description

A function to login with additional authData similar to the ParseUser.logInWithAdditionalAuth function in the JS SDK (1955)

Example Use Case

Multi-factor authentication (MFA)

Alternatives / Workarounds

It is possible to log in via the REST API and call PFUser.become(inBackground: sessionToken) with the obtained session token to become the user. The problem with this solution is that the SDK will then include the authData object when saving the PFUser:

{
  "firstName": "updated name",
  "authData": {
    "mfa": {
      "status": "enabled"
    }
  }
}

This prevents successful saving and leads to the following error on the server side since the Parse Server is calling validateUpdate inside the Auth Adapter because of the contained authData:

{
    "authenticationStep": "validateUpdate",
    "error": {
        "code": 141,
        "message": "Invalid MFA token"
    },
    "provider": "mfa",
    "user": "xxxxxxxxxx"
}

Activity

parse-github-assistant

parse-github-assistant commented on Jan 26, 2025

@parse-github-assistant

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @mtrezza@SteffenKeller

      Issue actions

        Support for Login with additional authData · Issue #1839 · parse-community/Parse-SDK-iOS-OSX