microsoft / microsoft/azurechat
Force application of authorization header can break extensions that require their own authorization header.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 1
Description
In chat-api-dynamic-extensions.ts there is the following code.
// we need to add the user id to the headers as this is expected by the function and does not have context of the user
headerItems.push({
id: "authorization",
key: "authorization",
value: await userHashedId(),
});
In my use case I am connecting to the Azure DevOps API. The API requires an 'Authorization' header with a personal access token issued by DevOps.
The current logic would apply two headers (authorization + Authorization) which breaks the api call.
Recommend we look at refactoring the requirement for that forced authorization header to help support more api call scenarios.
Thanks again for the great repo!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/features/chat-page/chat-services/chat-api/chat-api-dynamic-extensions.ts, especially where the authorization header is pushed into headerItems. Trace how extension headers are assembled and compare that behavior with the Azure DevOps personal access token use case. Done means extensions can supply their required authorization header without the forced user header breaking the API call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, typescript
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100