Skip to content

Support for Login with additional authData #1839

Open
@SteffenKeller

Description

@SteffenKeller

New Feature / Enhancement Checklist

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"
}

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

    No branches or pull requests

    Issue actions