Feature Flags allow you to safely test features in production and allow designated access to internal teams, beta customers, QA new features, and more. Frontegg's feature flagging utilizes the isEntitledTo
query to wrap specific areas of your app with designated access according to a user's associated attributes.
Getting Started with Feature Flags
Feature flags are built atop existing features. So, to flag a feature, you initially need to create one via the features' dashboard. To create a feature, go to Entitlements --> Features. Learn more about creating features here.
Creating a New Feature Flag
To create a new feature flag, go to Entitlements --> Feature Flags. Press the Create feature flag button and use the drop-down menu to choose the feature you want to flag from your features list.
Feature limit
Note that you can only use one flag per feature. A flag cannot be linked to multiple features.
Feature Flag Settings
Each feature flag has a Settings and a Targeting tab. The Settings tab includes fields like the flag's name and linked its features, and the Targeting tab includes the targeting rules you create for your flag.
Adding Targeting Rules
To create designated access to a feature flag, go to Add new targeting rules and select the attributes you wish to apply for that specific flag.
Attributes for Targeting
The default attributes we currently support for feature flagging are: email verified (frontegg.emailVerified
), user Id (frontegg.userId
), tenant Id (frontegg.tenantId
), and email (frontegg.email
). These attributes are included in the drop-down attributes menu. In addition to frontegg attributes, Custom attributes can also be used. Learn more about custom attributes in the next section.
Custom Attributes
You have the flexibility to create custom attributes that for rule-based/feature flagging purposes. When creating a custom attribute, the attribute Key will be used when you insert it in the targeting rules field (see below).
JWT Attributes
In addition to Custom attributes and default Frontegg attributes, you can target attributes from the user's JWT. Since we flat the jwt
object, you can access its nested properties, including arrays. For example, if you store information such as the user's date of birth as dateOfBirth
, you can target this attribute in your feature flagging engine by inserting a jwt.dateOfBirth
in the attribute field. For JWT attributes, you need to use the jwt
prefix.
Check our Entitlements SDKs Collection
Feature Flag Limitations
When creating Feature flags, note that there are some limitations:
- Each environment (developing/staging/production) is limited to 500 feature flags (Contact us if you need to set more flags).
- Each Feature Flag is limited to up to 10 Rules
- Each Rule is limited to up to up to 10 conditions
- The Attribute field is limited to up to 100 characters
- The Value/Segment field can contain up to 25 items
- Each Value/Segment is limited to up to 50 characters
Updated 22 days ago