Connect-on-Forge: Uninstalled webhook authentication fails

I’m encountering an issue with JWT authentication after automatically converting my Connect app’s descriptor file to a Forge manifest file, following the steps outlined in Part 2 of the migration guide (Part 2).

After the conversion, my manifest.yml file contains the following structure:

app:
  ...
remotes:
  ...
connectModules:
  ...
  jira:lifecycle:
    - key: lifecycle-events
      ...
      uninstalled: /uninstalled
permissions:
  ...

I have a corresponding endpoint defined in my remote backend using the Atlassian Connect Express (ACE) framework:

app.post("/uninstalled", addon.authenticate(), ...);

However, when the /uninstalled lifecycle event is triggered, my backend receives a request that is being rejected by the addon.authenticate() middleware with the following error:

{
  code: 401,
  message: "Invalid JWT: Algorithm from the header \"RS256\" does not match",
}

I think you want addon.authenticateInstall()