Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Authorization Header name #1786

Open
Cybertron01Z opened this issue Dec 18, 2024 · 0 comments
Open

Custom Authorization Header name #1786

Cybertron01Z opened this issue Dec 18, 2024 · 0 comments

Comments

@Cybertron01Z
Copy link

Our project uses an Azure Static Web App, which is linked to Azure Functions. The issue with this setup is, that the Authorization header is hijacked by Azure, to authenticate between SWA and the Functions (see Azure/static-web-apps#34).
Since I am currently integrating an OIDC server on Azure Functions (it is a simplified version, for mocking on our DEV env), we need to send the Bearer Toke for the /userinfo endpoint on a different header (e.g. X-Custom-Authorization).

But from what I can see, the header is not configurable: https://github.com/authts/oidc-client-ts/blob/main/src/JsonService.ts#L89-L92

Would it be possible to make this configurable?
I have tried with the extraHeaders config, but getting the accessToken is async, which means this won't work.

Is there another way this could work today already? If not would it be ok, if I create a PR with the change?

Thanks anyways for a great project :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant