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.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. 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?