Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kkajla12
Copy link
Contributor

Add support for the feature_flags claim. This claim will be exposed on the session as featureFlags and will contain a list of the string slugs for feature flags that are enabled for the current user session based on organization membership.

const { featureFlags } = newSession;
if (featureFlags.includes('my_flag')) {
   // ...
}

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Adds support for the feature_flags claim in the AuthKit React library, enabling feature flag access through the session object to control feature availability based on organization membership.

  • Feature flags will be exposed via featureFlags property in the session object, providing a type-safe way to check enabled features
  • Implementation follows TypeScript best practices by extending existing session types to include the new featureFlags array
  • Example usage demonstrates straightforward feature flag checking with includes() method

No files reviewed, no comments
Edit PR Review Bot Settings | Greptile

@kkajla12 kkajla12 merged commit ad90076 into main Jun 19, 2025
2 checks passed
@kkajla12 kkajla12 deleted the feat/addFlagsSupport branch June 19, 2025 00:10
@kkajla12 kkajla12 mentioned this pull request Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants