@oauth-spa-kit/server 2.2.1 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/handlers.js +5 -0
  2. package/package.json +2 -2
package/dist/handlers.js CHANGED
@@ -40,6 +40,11 @@ export function createLoginHandler(config) {
40
40
  nonce: pkce.nonce,
41
41
  code_challenge: pkce.codeChallenge,
42
42
  code_challenge_method: pkce.codeChallengeMethod,
43
+ // config.oauth.resource, not just extraAuthorizationParams -- see OAuthClientConfig's own
44
+ // doc comment: this is the one config knob that has to reach the authorize/PAR request
45
+ // AND every later token-endpoint call, so it gets its own field instead of asking every
46
+ // consumer to duplicate the same value into extraAuthorizationParams themselves.
47
+ ...(config.oauth.resource ? { resource: config.oauth.resource } : {}),
43
48
  ...(config.oauth.extraAuthorizationParams ?? {}),
44
49
  };
45
50
  if (dpopKeyPair) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oauth-spa-kit/server",
3
- "version": "2.2.1",
3
+ "version": "2.3.1",
4
4
  "description": "BFF-pattern OAuth handlers: sealed HttpOnly-cookie sessions + login/callback/refresh/logout route factories, built on Web-standard Request/Response so they drop into Nitro, Next.js route handlers, Cloudflare Workers, or plain Node (via a small adapter).",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -22,7 +22,7 @@
22
22
  "node": ">=18"
23
23
  },
24
24
  "dependencies": {
25
- "@oauth-spa-kit/core": "2.2.1"
25
+ "@oauth-spa-kit/core": "2.3.1"
26
26
  },
27
27
  "devDependencies": {
28
28
  "typescript": "^5.6.0",