"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