Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Azure ?appid= form of the shared-alias keys URL isn't recognized

Open
#275 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@heskew is already working on this.

Since Oct 2, 2026.

  • #276 by @heskew — open

Assessment

This issue has not been assessed yet.

Description

Follow-up from #271's final review (thread on src/lib/azureIssuer.ts:94).

isAzureJwksUri and azureJwksSegment reject any keys URL with a query string (url.search !== ''), so they miss Azure's documented ?appid=<client-id> form of the shared-alias keys URL. Microsoft tells apps that use custom signing keys (claims mapping) to append it to jwks_uri, for example https://login.microsoftonline.com/common/discovery/keys?appid=<id>.

For an explicit-endpoint Azure config with that jwksUri and no tenantId:

  • Unpinned (regression vs 2.8.1): not recognized as an Azure alias, so it falls into generic OIDC discovery. That fails, and the warning tells the operator to set issuer. On 2.8.1 this config booted without discovery.
  • Pinned (same as 2.8.1): not recognized, so the pin isn't bound to the tenant's own keys. Keys still come from the shared pool with issuerValidated: true, which src/lib/DESIGN.md says must not be built. The bare v1 alias already throws for this reason.

Fix:

  • In both matchers, accept a query made of exactly one appid parameter and keep it.
  • A pinned v2 alias redirects to /<guid>/discovery/v2.0/keys?appid=…, so custom-signed kids still resolve.
  • A pinned v1 alias throws, like the bare v1 alias.
  • An unpinned alias in either form is excluded from discovery, like the bare alias.

Tests: pinned and unpinned, each in v1 and v2 form, all with ?appid=.

A complete fix with tests is pushed on branch fix/azure-appid-alias (b8e6200, 1832 tests passing); it needs a PR and review.

Dominant language
JavaScript
Stars
1
Forks
3
Avg merge
1d 11h
Merged PRs (30d)
28

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HarperFast/oauth

All issues in HarperFast/oauth

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.