feat: add entitlements support to the React Native SDK#82
Merged
Conversation
Wire the native entitlements APIs through the RN bridge and JS API. The feature
already ships in the native SDKs this package bundles (frontegg-ios-swift 1.3.10
and frontegg-android-kotlin 1.3.34), so no native version bump is needed — this
just exposes them to JS.
- Android (FronteggRNModule.kt): loadEntitlements / getFeatureEntitlement /
getPermissionEntitlement @ReactMethods calling FronteggAuth, serializing
Entitlement -> { isEntitled, justification }.
- iOS (FronteggRN.swift + .m): matching @objc bridge methods.
- JS (FronteggNative.ts + index.tsx): loadEntitlements(forceRefresh?),
getFeatureEntitlement(key), getPermissionEntitlement(key), and the Entitlement type.
- docs/usage.md: Entitlements usage section.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
mykyta-frontegg
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds entitlements to the React Native SDK — on-device feature/permission gating — matching the native iOS/Android SDKs and the ionic-capacitor plugin (v2.1.1).
New JS API:
loadEntitlements(forceRefresh = false): Promise<boolean>getFeatureEntitlement(key: string): Promise<Entitlement>getPermissionEntitlement(key: string): Promise<Entitlement>Entitlement = { isEntitled: boolean; justification?: string | null }This is wiring, not a native change
The native SDKs this package already bundles ship the full feature, so no native version bump is needed:
1.3.10—loadEntitlements,getFeatureEntitlements,getPermissionEntitlements1.3.34— sameThis PR only exposes them through the RN bridge + JS layer.
Changes
FronteggRNModule.kt) — three@ReactMethods callingFronteggAuth, serializingEntitlement→{ isEntitled, justification }.FronteggRN.swift+FronteggRN.m) — matching@objcbridge methods.FronteggNative.ts+index.tsx) — the three wrappers + theEntitlementtype.docs/usage.md) — an Entitlements usage section.Verification
tsc --noEmitclean forsrc/;eslintclean on the changed files.Follow-ups (not in this PR)
🤖 Generated with Claude Code