Are you required to be authenticated to be able to check feature flags?
Trying out the feature flag functionality.
While I'm not logged in/authenticated - the flags always return the
defaultValue
set.
I recall mentioning that the flag values are bundled into the JWT or token? So is feature flagging only applicable to authenticated users & not more generally for flagging public pages?3 Replies
Hi @Rep.,
Yes, you're correct. The feature flags are indeed bundled into the JWT tokens that your application receives when a user signs in. This means that the feature flags are user-specific and require the user to be authenticated.
If you're not logged in, the system doesn't have a user context to pull the feature flags from, so it will return the
defaultValue
you've set.
Is there a specific use-case you were looking to solve with feature flags for flagging public pages? If so, are you able to explain a bit more about your use-case?Ok makes sense
Use case would be for potential feature flagging features for guest/unauthenticated users
Might be something on the home page that can be turned on and off
I see, are you able to explain more about what you would like to toggle on/off on the home page for guest/unauthenticated users? Any example would be great to bring back to my team so we can understand the use-case you are looking to solve.