const axios = require('axios');
const { mf2 } = require('microformats-parser');
-const { base64ToBase64URL } = require('@squeep/base64url');
const { parse: parseLinkHeader } = require('@squeep/web-linking');
const { Iconv } = require('iconv');
const { version: packageVersion, name: packageName } = require('../package.json');
static _challengeFromVerifier(verifier) {
const hash = createHash('sha256');
hash.update(verifier);
- return base64ToBase64URL(hash.digest('base64'));
+ return hash.digest('base64url');
}
const bufferLength = Math.floor(length * 3 / 4);
const randomBuffer = await randomBytesAsync(bufferLength);
- const verifier = base64ToBase64URL(randomBuffer.toString('base64'));
+ const verifier = randomBuffer.toString('base64url');
const challenge = Communication._challengeFromVerifier(verifier);
"integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==",
"dev": true
},
- "node_modules/@squeep/base64url": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/@squeep/base64url/-/base64url-1.0.5.tgz",
- "integrity": "sha512-J1UBXYQ4tBuHGnFfg0MdmxCP3oEti7jJWK/qBsg520d8tZd10sL6TXiMDGdBiH9GD3OtlfSYf6wWIN4QfdW21A==",
- "engines": {
- "node": ">=14"
- }
- },
"node_modules/@squeep/web-linking": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@squeep/web-linking/-/web-linking-1.0.7.tgz",
"url": "https://git.squeep.com/squeep-indieauth-helper/"
},
"engines": {
- "node": ">=14"
+ "node": ">=14.18 || >=15.7"
},
"author": "Justin Wind <jwind-npm@squeep.com>",
"license": "ISC",
"dependencies": {
- "@squeep/base64url": "^1.0.5",
"@squeep/web-linking": "^1.0.7",
"axios": "^1.3.3",
"iconv": "^3.0.1",