Last updated

What are features?

Features are defined as resources in your app that you want to protect. The features management page allows you to add new features and edit existing ones. Features are assigned with designated keys and permissions.


Importance of feature keys

Feature keys play a crucial role in Frontegg's Entitlements Engine by serving as identifiers for specific features within an application that need to be protected or granted access to certain users. These keys are integral to the customization and tailoring of features according to the needs of different user roles and subscription plans. This field is mandatory when creating a new feature.

Creating a new feature

To add a new feature, go to [ENVIRONMENT] → Configurations → Entitlements → Features.

  1. Click “Add new feature”
  2. Add the feature name - the internal name of the feature
  3. Add a description (optional)
  4. Add a key - create a key that you intend to use in your code (key validation)

Creating a new feature


Permission tab

You can assign related permissions to the feature if you would like to protect the resource using the useEntitlementsPermission function. This function will allow you to protect a resource by using permissions only.

The function useFeatureEntitlements is used in Frontegg SDK to determine if a user is entitled to a specific feature, even when permissions are not directly assigned.

You can assign as many permissions as you wish to one feature. The best practice here would be to add the relevant permissions to the feature. For example, if you have a "premium" feature, you can add premium.feature.read and premium.feature.write to the permission list. If a user has one of the permissions (granted by their role), they will be entitled to use the feature.

In order to link permissions to a feature, follow these steps:

  1. Click on the Permission tab
  2. Click "Assign permissions"
  3. Choose the relevant permissions
  4. Click Assign permissions and save.

Feature tab


Assigning permissions to features


Assigning features to plans

When creating features, users won't be able to access them unless you assign them to a specific plan.

Use case: defining protected features

Features in Frontegg act as named resources or toggles that define what functionality can be gated within your application. They are used in combination with plans and optionally permissions to control access.

For example, if you have a premium feature, you can create a feature key like premium-feature, associate it with specific plans, and optionally link relevant permissions (e.g., premium.feature.read).

By assigning features to plans and plans to accounts, Frontegg ensures that only authorized users can interact with specific parts of your app — without requiring hardcoded logic or manual configuration.