adobe / adobe/jwt-auth

Add http agent support to JWT Auth

Open
#50 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
17
Forks
13
PR merge metrics
No merged PRs in 30d

Description

### Expected Behaviour

JWT Auth works with custom http agent to support eg. proxy servers or custom dns resolving

### Actual Behaviour

JWT uses node-fetch without any means to configure the http agent

### Description

Some IT environments have additional requirements such as forcing users to use a http proxy with authentication or having other custom requirements. For this node-fetch foresees passing in an `agent` option, that allows custom network handling. See https://github.com/node-fetch/node-fetch#custom-agent https://nodejs.org/api/http.html#http_class_http_agent .

I propose extending the options of auth to allow setting an agent.

https://github.com/framefield/jwt-auth/commit/7e57f0d8665f7bdc2f8b01d60ee5fc6b3ad8379b

Contributor guide

Open the contributing guide

Research direction

Start by tracing the node-fetch call used by JWT Auth and the options passed into it; review the linked node-fetch custom-agent guidance first. Done when the auth options expose an agent and JWT requests use it for proxy or custom-DNS setups, with the project's relevant checks passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
authentication
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.