You can create a separate page types for Register / Login / Reset password page, and then implement the logic in index action.
I blogged about login functionality in AlloyTech using web api 2: http://dcaric.com/blog/episerver-login-functionality-using-web-api-2
Could be helpful :)
Thanks Dejan, I followed your blog post and was able to set up a Login page.
In the same way I can setup the registration page as well (if that’s possible).
I have few questions such as:
Thanks
Pankaj
I don't see it as EPi and non-EPi users.
In web.config, you can set different role and membership providers. Just like in any other ASP.NET application.
Then in web.config, you can set which users / groups have access to admin mode.
<location path="EPiServer/CMS/admin"> <system.web> <authorization> <allow roles="CmsAdmins" /> <deny users="*" /> </authorization> </system.web> </location>
CmsAdmins role can be from SqlServerRoleProvider, WindowsRoleProvider, your custom provider...
Birth date, first name, last name etc. can be stored in user profile http://world.episerver.com/documentation/Class-library/?documentId=cms/7/bcecc938-7158-9fa0-1922-380c0b16c17f
Or you can store them in some custom table.
Here's a nice tutorial regarding Facebook / Twitter / LinkedIn login: http://www.asp.net/mvc/overview/security/create-an-aspnet-mvc-5-app-with-facebook-and-google-oauth2-and-openid-sign-on
Hi Dejan,
I am palning to implement Asp.Net Identity as a membership provider.
How does it impact Episerver? How can I configure Asp.Net Identity as a secondary provider, keeping default (Sql server) as is?
Thanks
Pankaj
You can't combine OWIN authentication, such as ASP.NET Identity, and the Role+Membership Providers concept inside of EPi. When using OWIN authentication you set <authentication mode="None"></authentication>.
Hi Dejan,
I am trying to get Web API working but I'm just getting 404s no matter what I do.
Thanks
Hi Pankaj,
It’s difficult to tell w/o seeing the source code.
[Route(“login”)] [HttpPost] public IHttpActionResult AuthenticateUser(LoginInfo loginInfo) { }works fine, while
[Route(“login”)] [HttpPost] public IHttpActionResult AuthenticateUser(string username, string password) { }may result in 404.
Hi Dejan,
My bad, was using below.
[Route(“login”)] [HttpPost] public IHttpActionResult AuthenticateUser(string username, string password) { }
Hence the 404.
I am using the EPiServerProfile class to store additional properties for the users. The challenge now is how can I list these additional properties in the backend.
Thanks
Pankaj
Pardon my ignorance on this subject, I am new to Episerver.
I want to create a member registration, login, Facebook login and forgot password page. This is for the users who will have access to the restricted content on the site. These users will have nothing to do with the Episerver CMS.
I tried searching on this topic but did not find any relevant information.
Can someone help me with any reference links or info in this regard.
Thanks
Pankaj