Login with username, company and password

0
Hello, A normal login page is only with username and password. Is there a way to login with an extra parameter company? And if so, how?   Kind regards!
asked
1 answers
1

You can build this yourself: I have created a module where a user has to enter a username, password and Google authenticator code to login. The steps are as follows:

 

  1. Create a custom request handler which creates a session for a user and sets the cookie (NB: this requires Java)
  2. Enable anonymous users,
  3. Create a login page in Mendix with a non-persistent object with all relevant fields,
  4. Add a login button,
  5. Create a microflow to check the username and password (use the Java action System.VerifyPassword)
  6. Perform any additional logic (I would check the authenticator code, you may want to do something with the company?)
  7. Redirect the user to the request handler from step 1 using the URL redirector widget

 

As always when overriding default login behavior, be very conscious about the security. Especially in the request handler, you want to perform additional checks to ensure that the user has actually authenticated before you create the session.

answered