Skip to content

fix: readme #342

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

Merged
merged 4 commits into from
Apr 11, 2025
Merged

fix: readme #342

merged 4 commits into from
Apr 11, 2025

Conversation

ilteoood
Copy link
Contributor

@ilteoood ilteoood commented Apr 10, 2025

This should address an issue raised in #341

Resolves #341

README.md Outdated
@@ -41,7 +43,7 @@ const getJwks = buildGetJwks({
- `checkIssuer`: Optional user defined function to validate a token's domain.
- `providerDiscovery`: Indicates if the Provider Configuration Information is used to automatically get the jwks_uri from the [OpenID Provider Discovery Endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig). This endpoint is exposing the [Provider Metadata](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). With this flag set to true the domain will be treated as the OpenID Issuer which is the iss property in the token. Defaults to false. Ignored if jwksPath is specified.
- `jwksPath`: Specify a relative path to the jwks_uri. Example `/otherdir/jwks.json`. Takes precedence over providerDiscovery. Optional.
- `agent`: The custom agent to use for requests, as specified in [node-fetch documentation](https://github.com/node-fetch/node-fetch#custom-agent). Defaults to `null`.
- `fetchOptions`: The custom [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit) used to instrument `fetch`. Optional.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we sure that these are the ones that we should be referring to? aren't they those accepted by Undici, which while compliant with the standard (I believe) actually accepts different options?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undici accepts more parameters (like the dispatcher), with are not available in plain fetch
At the moment, we are using plain fetch provided by nodejs, which is compliant with the linked RequestInit

@ilteoood ilteoood requested a review from simoneb April 10, 2025 08:26
@simoneb
Copy link
Member

simoneb commented Apr 10, 2025

Can you please add a types test which confirms that we can pass a Node-specific option to fetchOptions?

@jeroenhabets jeroenhabets mentioned this pull request Apr 11, 2025
@simoneb simoneb merged commit 93500e2 into nearform:main Apr 11, 2025
6 checks passed
@github-actions github-actions bot mentioned this pull request Apr 12, 2025
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

Successfully merging this pull request may close these issues.

HTTP2 (H2) Support?
2 participants