oauth4webapi 1.3.0 → 1.4.0

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.
package/README.md CHANGED
@@ -58,10 +58,10 @@ The supported JavaScript runtimes include ones that support the utilized Web API
58
58
 
59
59
  These are _(this is not an exhaustive list)_:
60
60
  - Browsers
61
+ - Bun
61
62
  - Cloudflare Workers
62
63
  - Deno
63
64
  - Electron
64
- - Netlify Edge
65
65
  - Node.js ([runtime flags may be needed](https://github.com/panva/oauth4webapi/issues/8))
66
66
  - Vercel's Edge Runtime
67
67
 
package/build/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  let USER_AGENT;
2
2
  if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) {
3
3
  const NAME = 'oauth4webapi';
4
- const VERSION = 'v1.3.0';
4
+ const VERSION = 'v1.4.0';
5
5
  USER_AGENT = `${NAME}/${VERSION}`;
6
6
  }
7
7
  const encoder = new TextEncoder();
@@ -771,6 +771,7 @@ export async function processUserInfoResponse(as, client, expectedSubject, respo
771
771
  }
772
772
  async function authenticatedRequest(as, client, method, url, body, headers, options) {
773
773
  await clientAuthentication(as, client, body, headers, options?.clientPrivateKey);
774
+ headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
774
775
  return fetch(url.href, {
775
776
  body,
776
777
  headers,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oauth4webapi",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "OAuth 2 / OpenID Connect for Web Platform API JavaScript runtimes",
5
5
  "keywords": [
6
6
  "auth",
@@ -8,6 +8,7 @@
8
8
  "authorization",
9
9
  "basic",
10
10
  "browser",
11
+ "bun",
11
12
  "certified",
12
13
  "client",
13
14
  "cloudflare",
@@ -47,33 +48,36 @@
47
48
  "scripts": {
48
49
  "_format": "find src test tap examples conformance -type f -name '*.ts' -o -name '*.mjs' | xargs prettier",
49
50
  "build": "rm -rf build && tsc && tsc --declaration true --emitDeclarationOnly true --removeComments false && tsc -p test && tsc -p examples && tsc -p conformance && tsc -p tap",
50
- "conformance": "bash -c 'patch-package && source .node_flags.sh && ava --config conformance/ava.config.ts'",
51
+ "conformance": "bash -c 'source .node_flags.sh && ava --config conformance/ava.config.mjs'",
51
52
  "docs": "patch-package && typedoc",
52
53
  "format": "npm run _format -- --write",
53
54
  "format-check": "npm run _format -- --check",
54
55
  "prepack": "npm run format && npm run docs && ./examples/.update-diffs.sh && git diff --quiet && npm run test && npm run build",
56
+ "tap:browsers": "./tap/.browsers.sh",
57
+ "tap:bun": "./tap/.bun.sh",
55
58
  "tap:deno": "./tap/.deno.sh",
56
59
  "tap:edge-runtime": "./tap/.edge-runtime.sh",
60
+ "tap:electron": "./tap/.electron.sh",
57
61
  "tap:node": "bash -c './tap/.node.sh'",
58
62
  "tap:workers": "./tap/.workers.sh",
59
- "tap:browsers": "./tap/.browsers.sh",
60
63
  "test": "bash -c 'source .node_flags.sh && ava'"
61
64
  },
62
65
  "devDependencies": {
63
66
  "@esbuild-kit/esm-loader": "^2.5.0",
64
- "@types/node": "^18.11.7",
67
+ "@types/node": "^18.11.9",
65
68
  "@types/qunit": "^2.19.3",
66
69
  "ava": "^5.0.1",
67
- "edge-runtime": "^2.0.0",
70
+ "bowser": "^2.11.0",
71
+ "edge-runtime": "^2.0.1",
68
72
  "jose": "^4.10.4",
69
73
  "patch-package": "^6.5.0",
70
74
  "prettier": "^2.7.1",
71
75
  "prettier-plugin-jsdoc": "^0.4.2",
72
76
  "qunit": "^2.19.3",
73
- "testcafe": "^2.0.1",
77
+ "testcafe": "^2.0.2",
74
78
  "testcafe-browser-provider-browserstack": "^1.14.0",
75
79
  "timekeeper": "^2.2.0",
76
- "typedoc": "^0.23.19",
80
+ "typedoc": "^0.23.20",
77
81
  "typedoc-plugin-markdown": "^3.13.6",
78
82
  "typescript": "^4.8.4",
79
83
  "undici": "^5.12.0",