Facing issue in spotify login

When using 3rd party auth spotify for login, i am getting below error. Please let me know if i am missing anything in the parameters.

Uncaught internal server error. spotify options are required.

Here is the code which is written in swift:

let authData = ["id": spotifyUserId, "access_token": spotifyAccessToken]

PFUser.logInWithAuthType(inBackground: "spotify", authData: authData).continueWith { task -> Any? in
       if ((task.error) != nil){
            print("Error with parse login: \(task.error!.localizedDescription)")
            return task
        } else {
                        // save user
         }
     }
      print("Successfuly signed in with spotify")
      return nil
 }

Same code is working fine when i am passing authType = “apple” and in authData = [token, id]

  • Parse ObjC SDK version: 5.1.1