PFUser.logInWithUsernameInBackground does not work in Parse 1.7.4

266 Views Asked by At

I am trying to log in the user using the captured credentials from my username & password fields.

My code inside an IBAction (of a button) is the following:

PFUser.logInWithUsernameInBackground("Test", password: "123123"){ (user:PFUser?,error:NSError?) -> Void in
                if(user != nil){
                        var alert = UIAlertView(title: "Success", message: "Logged IN as \(user)", delegate: self, cancelButtonTitle: "OK")
                        alert.show()

                }else{
                        var alert = UIAlertView(title: "Ooops!", message: "Something unexpected happened", delegate: self, cancelButtonTitle: "OK")
                        alert.show()


                }
            }

Whenever my IBAction code executes, Parse throws the following error:

MyApp[104837:2958754] [Error]: invalid login parameters (Code: 101, Version: 1.7.4)

At the beginning I thought that it might have been a problem with my TextFields (since I have a custom class for them, but when I gave the username and password static parameters directly in Parse's login function, I confirmed that something was wrong.

Could you explain me why this is happening? The only thing I can really attribute it to is a corrupted Parse library or an error on Parse's end. I might be wrong though.

Any help or advice is much appreciated!

Cheers!

0

There are 0 best solutions below