How to limit project scope of a Forge app by Jira Project Admin?

We have developed a Forge app and want to limit the scope to specific projects.
By using a condition on confer level, we can limit the availability to pre-defined projects.
But we would like to let a project admin decide to enable (or disable the Forger App by a toggle under Project Admin > Apps > “myApp”.
Is there a code example available?

Regards
Ingo

Welcome to the Atlassian developer community @IngoWenke,

I’m not aware of any code examples but I have seen apps do this. It’s mostly “case by case”. I think many have used project properties.

That said, Atlassian is already coming at this problem from the other direction. Specifically the app-access-rule is a future feature that would let admins restrict apps from having access to specific Confluence spaces or Jira projects. It might be worth waiting a little to make sure your approach fits well with that new capability.