Creation of login page / user database

Enonic version: Enonic XP 6.14.1
OS: Windows 10


I’ve been through all the tutorials in the documentation. I find them very interesting but also very basic and they don’t help much when you want to do something more complex. In addition there are only 3-4 videos o_0 which is insufficient for a fully understanding of Enonic. I haven’t found any information about how to create a front end login page and I would appreciate some help. What’s the best approach? How do I create a users database? Do I have to use Enonic storage system or should I use a different type of database as SQL and integrate it into Enonic?

Thanks a lot in advance.

Hello Jorge,

I’ve looked through the code enonic team has provided with their app like: Though, I’d recommend to take a look at all their projects It was helpful to me.

1 Like

Hi Jorge!

Thanks for reaching out!
You are right, docs on authentication and friends is not good enough, but it will be better soon!

In the meantime, I can try to help you out here:

  1. Enonic XP has a concept called userstores and idproviders. Create a userstore and assign an idprovider to it. Idproviders are essentially apps designed to handle authentication and everything related to users. Internally XP only understands “users/groups/roles” that are created within the userstore concept.
  2. There are already several idprovider apps on Enonic Market:

They are all open source, so please have a look

  1. How does this work? The essential idea is separation of concern so you don’t need to deal with authentication and user handling in your app/site, and leave this functionality to an idprovider. Idproviders are mapped to your solution through virtualhosts. Each vhost has a dedicated idprovider that will be triggered when required. I.e. when app throws a 401 error (auth required).
  2. For users there is also a concept called profiles, that allow you to extend users with custom attributes as required.
  3. To answer you question specifically. The best approach is simply to use an existing idprovider (or implement your own if none of the existing fit your requirements). Idproviders may act as “cache” for external systems such as LDAP - or it may handle everything locally like the SimpleIDprovider does.
  4. Finally, you may also “hardcode” authentcation directly into your app, skipping idproviders - but this would only make sense for special requirements.

If you need to implement your own idprovider, check out the auth library:!/module-auth.html

Hope this helps!

Hi tsi,

Thanks a lot for your quick reply. I’ll work on all that.


Hi Nat,

Thanks a lot for your quick reply. I’ll have a look at all that.