"Bad credentials" on sign up

Hi. Facing an error on creation of users on their own. It gives a false error “Bad credentials” despite the account is actually being created leaving users creating multiple accounts thinking it hasn’t worked. Anyone else facing this? DHIS2 2.30 build 345003b

2 Likes

To add more context, it appears that this happens because there is an attempt to log in after account creation and possibly fails two-factor authentication. Is there a way this can be disabled?

  • INFO 2019-09-19 10:05:03,893 Created user with username: vikwato_2 (AccountController.java [http-bio-8080-exec-9])
  • INFO 2019-09-19 10:05:03,894 Login attempt: vikwato_2 (TwoFactorAuthenticationProvider.java [http-bio-8080-exec-9])
  • INFO 2019-09-19 10:05:03,910 Login attempt failed for remote IP: 0:0:0:0:0:0:0:1 (AuthenticationListener.java [http-bio-8080-exec-9])
  • WARN 2019-09-19 10:05:03,912 Authentication event AuthenticationFailureBadCredentialsEvent: vikwato_2; details: org.hisp.dhis.security.spring2fa.TwoFactorWebAuthenticationDetails@380f4: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: 1EF2AD230F4463C771F1818EC9B9E009; exception: Bad credentials (LoggerListener.java [http-bio-8080-exec-9])
  • WARN 2019-09-19 10:05:03,916 Resolved [org.springframework.security.authentication.BadCredentialsException: Bad credentials] (AbstractHandlerExceptionResolver.java [http-bio-8080-exec-9])
2 Likes

Hi @vikwato, thanks for the report. Could you please provide more info about what you are doing and steps to reproduce this, e.g. is this the user self-registration screen accessed from the login page?

regards,

Lars

1 Like

Hi @Lars. This happens at the user self registration stage. After filling up all the form fields and clicking the submit button, the error “Bad credentials” appears under the last field. Despite this error, the account is created.

1 Like

@Lars, any further help on this?

1 Like

@WaluQ Hi, did you get any reply on this topic? I’m facing the same issue you’ve described previously.
Thanks

Nothing yet. Still having the same issue.

Hi @WaluQ,

I tried to reproduce your error on our play servers and I found this is happening only in 2.30 version. The issue is gone in 2.31 and higher versions. Since 2.30 is unsupported version, I would recommend you to upgrade your DHIS2 instance .

Gintare

1 Like

Yes we are currently on 2.30, didn’t notice the version was already out of the support margin :sweat:
We’ll start upgrade plans.

1 Like