Create a custom membership provider

Overview

This article explains how to build our own custom Membership Provider to let users authenticate to Sitefinity CMS using an external database or service. You can use the provider to either authenticate users for the frontend and the backend of the website.

Background information

In the Sitefinity CMS security realm, the management of users and roles is handled through the ASP.NET Membership Provider APIs. Sitefinity CMS uses its own implementations of the membership and role providers, which utilize Telerik OpenAccess to persist users and roles into Sitefinity CMS database.

Scope

The scope of this article is to build a custom Membership Provider, which persists data into an external, custom database. You will be using the Entity Framework to define the model and to handle the communication with the external database.

The article implements the methods that let you manage your external users from the Sitefinity CMS backend and be able to login to the backend with your user.

Finally, you will see how you can create a public login page that makes use of the new Membership Provider.

NOTE: If you are using MVC widgets on your page, you need to have a hybrid page to add a Login name widget because it is a Web Forms widget. For more information, see Overview: Page templates.

The following is a short video demonstrating the usage of a custom membership provider:

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?