updates, fix S256 PCKE check

This commit is contained in:
Evert Prants 2023-10-10 19:50:12 +03:00
parent 4babfa801a
commit 0308ee702d
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
3 changed files with 445 additions and 257 deletions

680
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "@icynet/oauth2-provider",
"version": "1.0.7",
"version": "1.0.8",
"description": "OAuth2.0 Provider for Icy Network",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@ -12,14 +12,14 @@
"author": "Evert <evert@lunasqu.ee>",
"license": "MIT",
"devDependencies": {
"@types/express": "^4.17.13",
"@types/express-session": "^1.17.4",
"@types/node": "^17.0.21",
"prettier": "^2.5.1",
"typescript": "^4.5.5"
"@types/express": "^4.17.18",
"@types/express-session": "^1.17.8",
"@types/node": "^20.8.4",
"prettier": "^3.0.3",
"typescript": "^5.2.2"
},
"dependencies": {
"express": "^4.17.3",
"express-session": "^1.17.2"
"express": "^4.18.2",
"express-session": "^1.17.3"
}
}

View File

@ -9,5 +9,9 @@ export function sha256hash(input: string) {
}
export function createS256(input: string) {
return sha256hash(Buffer.from(input).toString('ascii')).toString('base64');
return sha256hash(Buffer.from(input).toString('ascii'))
.toString('base64')
.replace(/\+/g, '-')
.replace(/\//g, '_')
.replace(/=+$/, '');
}