Testing license for new Forge app

Hello,
we are currently developing a new forge app, and we want to add the license check to the app,
we are following the documentation provided here : https://developer.atlassian.com/platform/marketplace/listing-forge-apps/#testing-your-app-with-different-license-states
we found that we can test the license in both backend and frontend,
we tried the backend solution and it worked fine,
but for the frontend, we noticed this issue:
Note: The license object is only present for apps in the production environment. license is undefined for apps not listed on the Atlassian Marketplace, and apps in custom environments.

for what we understand, we need to deploy on production each time we want to test this feature, what will change the version of the app,

is there a better solution?
do you recommend, not using what proposed in the documentation and define a function that checks the license from backend,

kind regards,

Hello @AliSalem1

Yes, a good solution is to handle the license check in the backend and call it from the frontend.

Since the license object is only available in production for Marketplace-listed apps, relying on it directly in the frontend makes testing more difficult. Instead, you can implement the license validation in a backend resolver (where it works reliably, including with LICENSE_OVERRIDE) and expose a small method like getLicenseState that the frontend calls via invoke.

This way, the backend remains the single source of truth, and you avoid having to deploy to production each time just to test frontend license behavior.

Kind regards,