Passwords are a necessary evil. They protect your applications and are half of a puzzle that authenticates us to access our applications. Today we have a ton of credentials to remember. Fortunately, biometric authentication and password managers make things easier. Single sign-on improves that even more. Mainly if you use a lot of applications from the company you work for. However, not all applications have the infrastructure to be supported by a single sign-on.
And then there are those users who always forget their password. Some applications, such as Slack, support magic links; you enter your username, and they email you to log in.
Some applications, such as Happyscribe, even make this the only method for logging in.
Great news: you can now implement this in your Mendix app with the latest module I released!
You create your users using the Administration module. For passwords, you can generate random long values.
Your users will never use them anyway. When your user enters their username or e-mail address, the system will look up their account. When it exists, it will send an email to the address associated with their account. This email includes a Single Sign On (SSO) link containing a UUID and a key with some encrypted data.
The user will then click on that link and instantly be transferred to your application in a new session.
The expiration of the SSO link is configurable. By default, it is set to 15 minutes. Older SSO links will be removed if a user starts a new login process. Of course, you must enable the appropriate scheduled event to make that work.
Suppose you want to prevent your users from using the default login. You then may use the Disable Mendix Login or Local login filter to prevent the regular login flow from being used.
Mendix has a license module based on active named users, which can sometimes be problematic for smaller businesses. Especially if you have loads of users but they aren’t frequent active users. To efficiently use the license, you might want to adequately use the number of active named users you purchased. This module allows you to deactivate inactive users (users who do not actively use the application). And they will automatically reactivate the moment they log in via the login process.
Would you use this module in your Mendix application? Do you have any feature requests? Let me know in the comments! 💬