update icynet passport

This commit is contained in:
Evert Prants 2022-09-11 15:09:31 +03:00
parent cf521f9434
commit d9adcb2fa9
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
4 changed files with 51 additions and 35 deletions

55
package-lock.json generated
View File

@ -14,7 +14,7 @@
"express-session": "^1.17.2",
"jimp": "^0.16.1",
"passport": "^0.5.2",
"passport-icynet": "^0.0.1",
"passport-icynet": "^0.0.3",
"redis": "^3.1.2",
"socket.io": "^4.4.1",
"sqlite": "^4.0.25",
@ -27,6 +27,7 @@
"@types/connect-redis": "^0.0.18",
"@types/express-session": "^1.17.4",
"@types/passport": "^1.0.7",
"@types/passport-oauth2": "^1.4.11",
"@types/sqlite3": "^3.1.8",
"@types/three": "^0.139.0",
"@types/webpack-dev-server": "^4.7.2",
@ -2437,6 +2438,15 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz",
"integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw=="
},
"node_modules/@types/oauth": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/@types/oauth/-/oauth-0.9.1.tgz",
"integrity": "sha512-a1iY62/a3yhZ7qH7cNUsxoI3U/0Fe9+RnuFrpTKr+0WVOzbKlSLojShCKe20aOD1Sppv+i8Zlq0pLDuTJnwS4A==",
"dev": true,
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/passport": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@types/passport/-/passport-1.0.7.tgz",
@ -2446,6 +2456,17 @@
"@types/express": "*"
}
},
"node_modules/@types/passport-oauth2": {
"version": "1.4.11",
"resolved": "https://registry.npmjs.org/@types/passport-oauth2/-/passport-oauth2-1.4.11.tgz",
"integrity": "sha512-KUNwmGhe/3xPbjkzkPwwcPmyFwfyiSgtV1qOrPBLaU4i4q9GSCdAOyCbkFG0gUxAyEmYwqo9OAF/rjPjJ6ImdA==",
"dev": true,
"dependencies": {
"@types/express": "*",
"@types/oauth": "*",
"@types/passport": "*"
}
},
"node_modules/@types/qs": {
"version": "6.9.7",
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
@ -7420,9 +7441,9 @@
}
},
"node_modules/passport-icynet": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/passport-icynet/-/passport-icynet-0.0.1.tgz",
"integrity": "sha512-KexoVzQWDmAu5g1mL25TFd6PpjlhpmMbdkCWWXqybMrHpq6iDOWjjfd0ggoeNwWECOJu4rwGx3uUvwZpzL+ikA==",
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/passport-icynet/-/passport-icynet-0.0.3.tgz",
"integrity": "sha512-V+zn1FgQzbkuHygkZYa/3K2Fij19ub2vhVTyqPO6/eKZgAIFhW201R9KzZCsRrBPdJSsm8YVdqHxqp34yMZvsg==",
"dependencies": {
"passport-oauth2": "^1.2.0"
}
@ -11922,6 +11943,15 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz",
"integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw=="
},
"@types/oauth": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/@types/oauth/-/oauth-0.9.1.tgz",
"integrity": "sha512-a1iY62/a3yhZ7qH7cNUsxoI3U/0Fe9+RnuFrpTKr+0WVOzbKlSLojShCKe20aOD1Sppv+i8Zlq0pLDuTJnwS4A==",
"dev": true,
"requires": {
"@types/node": "*"
}
},
"@types/passport": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@types/passport/-/passport-1.0.7.tgz",
@ -11931,6 +11961,17 @@
"@types/express": "*"
}
},
"@types/passport-oauth2": {
"version": "1.4.11",
"resolved": "https://registry.npmjs.org/@types/passport-oauth2/-/passport-oauth2-1.4.11.tgz",
"integrity": "sha512-KUNwmGhe/3xPbjkzkPwwcPmyFwfyiSgtV1qOrPBLaU4i4q9GSCdAOyCbkFG0gUxAyEmYwqo9OAF/rjPjJ6ImdA==",
"dev": true,
"requires": {
"@types/express": "*",
"@types/oauth": "*",
"@types/passport": "*"
}
},
"@types/qs": {
"version": "6.9.7",
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
@ -15773,9 +15814,9 @@
}
},
"passport-icynet": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/passport-icynet/-/passport-icynet-0.0.1.tgz",
"integrity": "sha512-KexoVzQWDmAu5g1mL25TFd6PpjlhpmMbdkCWWXqybMrHpq6iDOWjjfd0ggoeNwWECOJu4rwGx3uUvwZpzL+ikA==",
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/passport-icynet/-/passport-icynet-0.0.3.tgz",
"integrity": "sha512-V+zn1FgQzbkuHygkZYa/3K2Fij19ub2vhVTyqPO6/eKZgAIFhW201R9KzZCsRrBPdJSsm8YVdqHxqp34yMZvsg==",
"requires": {
"passport-oauth2": "^1.2.0"
}

View File

@ -17,7 +17,7 @@
"express-session": "^1.17.2",
"jimp": "^0.16.1",
"passport": "^0.5.2",
"passport-icynet": "^0.0.1",
"passport-icynet": "^0.0.3",
"redis": "^3.1.2",
"socket.io": "^4.4.1",
"sqlite": "^4.0.25",
@ -30,6 +30,7 @@
"@types/connect-redis": "^0.0.18",
"@types/express-session": "^1.17.4",
"@types/passport": "^1.0.7",
"@types/passport-oauth2": "^1.4.11",
"@types/sqlite3": "^3.1.8",
"@types/three": "^0.139.0",
"@types/webpack-dev-server": "^4.7.2",

View File

@ -7,10 +7,8 @@ import connectRedis from 'connect-redis';
import http from 'http';
import { join } from 'path';
import { Server, Socket } from 'socket.io';
import { Server } from 'socket.io';
import { IcyNetUser } from '../common/types/user';
import { Canvas } from './object/canvas';
import { CanvasRecord, Placement } from '../common/types/canvas';
import { config } from './config';
import { Game } from './object/game';

View File

@ -1,24 +0,0 @@
declare module 'passport-icynet' {
declare class Strategy {
name?: string | undefined;
authenticate(
this: StrategyCreated<this>,
req: express.Request,
options?: any,
): any;
constructor(
options: {
clientID: string;
clientSecret: string;
callbackURL: string;
scope?: string[];
},
callback: (
accessToken: string,
refreshToken: string,
profile: any,
done: Function,
) => void,
);
}
}