How to Create Registration page?

2
Hi Experts, I want to create a registration page for anonymous users. So, I have created a entity with few attributes(name, password, etc.,) along with data view to show the page in the UI where the anonymous user can enter and register their details. once after the registration is completed the anonymous user can click save button to save his details, Here I need that if he/she clicks the save button the username and password should be assigned to them and he can able to login with that. can you please help me resolve this?   Thanks in Advance!    
asked
2 answers
3

Enable anonymous users and then create the pages you need. https://docs.mendix.com/refguide/anonymous-users 

Be careful though: it can be tricky from a security point of view

https://docs.mendix.com/howto/security/best-practices-security

https://docs.mendix.com/howto/security/set-up-anonymous-user-security 

I hope this helps.

answered
2

In a microflow under the save button pass the registration entity and create Account entity with the values. Make sure your password validation matches and usernames need to be unique so also cover that one or else your commit with fail.

At the end of the flow close your page and guide the still anonynous user to your sign in page. I don't know if it's still not possible for automatically signin after hittin the save button. That would be your next step I gues. The NanoFlow commons has a Javascript SignIn action which you could possibly use.

Make sure your registration entity is non persistent or deleted, so you don't end up with unhashed passwords in your database.

answered