LICENSE_OVERRIDE doesn't work for forge custom UI frontend check

Hello!
I develop app and try to get license details on frontend during forge tunnel
Here is documentation. I use latest lib versions.

import { view } from @forge/bridge;
const context = await view.getContext();

if (context.license.active !== true) {
  console.log("App is not licensed");
  return;
}

I rewrote the LICENSE_OVERRIDE variable ( documentation )

image

But I still get license: null

I can get this info from the backend, but it would be better for me to retrieve it from the frontend.

Can you fix this behavior?

Kind regards,

VortexWeb Innovations

Hi @VortexWebInnovations

Apologies for the slow reply! I’ve had a look, and it seems like this isn’t a known issue - are you still experiencing this problem?

Thanks!
Mel

Hello @mpaisley

  1. I have forge custom ui app,
  2. @forge/bridge”: “^4.0.0”,
  3. forge cli 10.6.1

image

So, I retrieve the license information from my backend function. The backend license information is working.

Kind regards,

VortexWeb Innovations

Hi @VortexWebInnovations,
In my experience, the license should work in STG and production.
If using a custom UI, you need to handle checking the license in BE and then use Invoke to handle UI
Eg: invoke(‘isLicenseActive’)

Hello @SuHoangAn !
I’m doing exactly what you wrote.

However, I don’t understand why Atlassian has done

import { view } from '@forge/bridge'; 
const context = await view.getContext();

if it only works in production and I can’t develop or test my app using it.

Kind regards,

VortexWeb Innovations

Hi @VortexWebInnovations , please check it in this doc
need the prefix FORGE_USER_VAR_ to use variable