Hello,
I’ve registered a few users from Custom business logic, using the java sdk.
Registration work, however when i try to login using the provided password, i get “invalid identity or password”.
If i set the password from the Backendless console, the login works.
Thank you,
Mihai
Hi Mihai!
I checked this use case. And it works for me as expected.
Could you provide your code example?
Regards,
Kate.
Hi Kate!
public void registerUser(ExternalUser externalUser, User supervisor, String email, String password) {
BackendlessUser backendlessUser = new BackendlessUser();
backendlessUser.setEmail(email);
backendlessUser.setPassword(password);
BackendlessUser register = Backendless.UserService.register(backendlessUser);
User user = new User();
user.setUser(register);
user.setEmail(email);
user.setSupervisor(supervisor);
user.setUserType(externalUser.getUserType());
user.setName(externalUser.getName());
Backendless.Persistence.save(user);
}
The register method is not throwing any exceptions.
Require Email confirmation is disabled, Execute Registration Callback is disabled.
Am I missing something ?
Thank you,
Mihai
Thank you. I can reproduce this issue.
Problem in line:
user.setUsers( register );
We will try to resolve this issue on the next week.
Regards,
Kate.
Thank you for the info.
I will try to use a workaround in the mean time.
The temporary workaround is to remove password from the user right after the registration.
BackendlessUser register = Backendless.UserService.register(backendlessUser);
register.removeProperty( BackendlessUser.PASSWORD_KEY );
This way you will be able to save the objects with relation to this user without affecting his password.
Wow… way nicer than my solution. I just saved the User.objectId … so i lost the relation. I would just retrieve it later by id.
Time to do a little refactoring.
Thank you.
Hi Mihai,
The issue has been fixed.
Mihai,
If you could try it out again (without the workaround) and confirm it, it would be great!
Regards,
Mark
Hi Mark & Sergey,
Just tested. It’s working as expected. Thank you for the update.
One question: when will this fix be available for the standalone server ?
Best regards,
Mihai
Hi Mihai,
The Standalone server is about 2 weeks behind the Cloud Edition.
Regards,
Mark