on 2018 Jul 23 10:33 AM
Hi Team,
I am facing some problem with the backend password change. When i am logged in with one user and in gateway I change the password user password and and now I am trying to login with new credentials its not working and even if I kill my app and try to login with the updated credentials, its failing and once I unregister my app and try to login with updated credentials its working.
I am using SMP SDK SP14 PL12 libraries in android.
Please find below for the snippet I am using in Android.
sLGCORE.changeBackendPassword(mPassword)
In the listener I have written below code
backendPasswordChanged() this method always returns TRUE in case of backend password is changed or not.
@Override
public void backendPasswordChanged(boolean backendPasswordChanged) {
MPLCommon.getInstance().showMPLLog(MPLComponents.LogTypes.VERBOSE,
"backendPasswordChanged ====>" + backendPasswordChanged);
if (backendPasswordChanged) {
// Backend password not changed.
if (!mPassword.equalsIgnoreCase(RacePreferences.getInstance().getPrefPassword())) {
mLoginResult = mContext.getString(R.string.invalid_creds);
isErrorStaus = true;
mServiceListener.onServiceError(mLoginResult);
} else {
try {
sLGCORE.changeApplicationPassword(RacePreferences.getInstance().getPrefPassword(), mPassword, backendPasswordChanged);
} catch (LogonCoreException e) {
e.printStackTrace();
}
RacePreferences.getInstance().setPrefPassword(mPassword);
RacePreferences.getInstance().setSubStatus(false);
mServiceListener.onResponse(null);
}
} else {
//backend password changed.
try {
RacePreferences.getInstance().setPrefPassword(sLGCORE.getLogonContext().getBackendPassword());
} catch (LogonCoreException e) {
e.printStackTrace();
}
mLoginResult = mContext.getString(R.string.invalid_password_change);
isErrorStaus = true;
mServiceListener.onServiceError(mLoginResult);
}
}
@Override
public void applicationSettingsUpdated() {
MPLCommon.getInstance().showMPLLog(MPLComponents.LogTypes.VERBOSE, "applicationSettingsUpdated ====>");
}
});
}
Can anyone help me out solving this problem.
Request clarification before answering.
This works by design. It's an SMP/SCPms security feature, that it doesn't let the user to login without the credentials that it used during the registration. As you figured it out already, the only workaround is to re-register. I would recommend to use push notifications before the change to let the user know that he/she has to re-register soon, or maybe delete the registration (DELETE to https://<hcpmsURL>:443/odata/applications/<version>/<appID>/Connections('<registrationID>')) and force the user to reregister in this way. Maybe you can create an enhancement request for the product management to make it more user friendly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Akos Grabecz,
Thanks you for your response,
Forgot to mention, I am able to login with old credentials. Now as per your suggestion if I perform re-registration I will lose application offline data.
This scenario works for the IOS platform, so what's the difference between android and IOS libraries in SMP 3.0 SDK SP14 PL12 for the same scenario.
| User | Count |
|---|---|
| 18 | |
| 7 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.