I want to implement registration and login in AEM Website.
I found this link: https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/sites/authoring/per...
But the proper process for the same is not descibed in it. In it it's mentioned that UserManager API can be used but how is not mentioned.
Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @janhavi_singh ,
Are you looking to create user in AEM only or in some third party. If you are looking to create in AEM, you can create user using UserManager Api and for Login, you can write a simple component.
You can use this code to login.
<form class="user" method="POST" action="${authenticationUrl}"> <input type="hidden" name="resource" value="${redirectResource @ extension = 'html'}"> <input type="hidden" name="_charset_" value="UTF-8"> <div class="form-group"> <input type="text" id="userEmail" placeholder="User" name="j_username"> </div> <div class="form-group"> <input type="password" id="userPassword" placeholder="Password" name="j_password"> </div> <button class="btn btn-primary" type="submit"> Login </button> </form>
authenticationUrl - This in form action can be valid resource but should end with /j_security_check
ie. currentPage.getPath()+"/j_security_check"
redirectResource - resource/page to redirect after login
To create user, check this.
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/programmatic-user-creation...
Is the User Data Synchronization feature must be enabled for your program?
If not enabled, user information will be persisted for just a short period (1 to 24 hours) before disappearing.
Hi @janhavi_singh ,
Are you looking to create user in AEM only or in some third party. If you are looking to create in AEM, you can create user using UserManager Api and for Login, you can write a simple component.
You can use this code to login.
<form class="user" method="POST" action="${authenticationUrl}"> <input type="hidden" name="resource" value="${redirectResource @ extension = 'html'}"> <input type="hidden" name="_charset_" value="UTF-8"> <div class="form-group"> <input type="text" id="userEmail" placeholder="User" name="j_username"> </div> <div class="form-group"> <input type="password" id="userPassword" placeholder="Password" name="j_password"> </div> <button class="btn btn-primary" type="submit"> Login </button> </form>
authenticationUrl - This in form action can be valid resource but should end with /j_security_check
ie. currentPage.getPath()+"/j_security_check"
redirectResource - resource/page to redirect after login
To create user, check this.
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/programmatic-user-creation...