Invalid username/email and/or password!
-
Hello,
I am using the following ruby code to register users in my db. The registration is successful. However, when I try to authenticate any of the registered user, I get the message, “Invalid username/email and/or password!”. Any ideas why this is happening? I am using the 2.8 version of the JSON Api User and the JSON Api Auth v 1.9.
nonceUrl = ‘base_url/get_nonce/?controller=user&method=register’
people.each do |f|
puts f.username + ‘, ‘ + f.email + ‘, ‘ + f.displayNameresponse = HTTParty.get(nonceUrl)
responseString = response.body
# puts responseString
puts ‘Parsing json response for nonce…’json = JSON(responseString)
puts json
nonce = json[“nonce”]
puts ‘Nonce is:’ + nonceuserEmail = f.email
username = f.username
pass = Digest::MD5.hexdigest(‘12345678’)
displayName = f.displayNameregisterUserUrl = ‘base_url/user/register/?username=’ + username + ‘&email=’ + userEmail + ‘&user-pass=’+ pass + ‘&insecure=cool&nonce=’ + nonce + ‘&display_name=’ + displayName
registerResponse = HTTParty.get(registerUserUrl)
puts registerResponse.body
endI am trying to authenticate using:
“base_url/user/generate_auth_cookie/?insecure=cool&email=\(username)&password=\(password)”
Any ideas why this is not working anymore? I used to be able to authenticate a few days ago.
I cannot login not even through the site’s wordpress login page.
Thanks
- The topic ‘Invalid username/email and/or password!’ is closed to new replies.