Try our conversational search powered by Generative AI!

Episerver admin login



So I am trying to do a custom login or extend the one episerver uses for the admin login. I have an external api and those user would have roles. So if a user from that api has an admin role I would like to log in him in the admin panel.

Any heads up in doing this?

Dec 21, 2017 10:41

If you have an older site that uses the old membership provider model I recommend creating your own custom membership and roleprovider. There should be a few guides out there to do that. You can also use virtual roles of Episerver to map your roles to the WebAdmins role or similar after to save you some trouble. 

Using the new identity and claim based model from Episerver 10+ it's a little trickier but you can insert your own implementation of userstore etc in the owin startup. I did that in an earlier project.

Dec 21, 2017 11:17

No I don't have an older website. Its an external api. In a way you could say that I have an older website but that is not built in episerver.

Virtual roles seems a nice solution, I would try to implement that. 

Dec 21, 2017 11:32

Is there a way that I can extend how episerver log in users? 

So what I am trying to do is extend the class used for loggin in, which I can't find. 

In that class I put in my function to check if a user can be logged in that way. 

Is it possible?

Dec 21, 2017 11:53

Yes it's possible to extend. 

The authentication is built on the standard .NET Membership provider model for older Episerver sites. So if you have version 9 or earlier of Episerver you should look for .NET guides of how to implement a custom Membership provider. It's more a .NET issue than Episerver. Which Membership provider to use for your site is set in configuration in web.config. 

If you have version 10 of Episerver or newer you want to look into extending .NET Identity which is used for authentication. It's a little tricky. Which user store to use is normally set in owin startup class in your Episerver project so you will want to modify that to use your own. 

Hopefully those links will help you choose the best solution

Dec 21, 2017 12:48
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.