diff --git a/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts b/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts index 4e3c0eaeb..b6e7ca5c2 100644 --- a/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts +++ b/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts @@ -159,11 +159,11 @@ export class AuthenticationResolver { const authComPublicKey = new Ed25519PublicKey(authCom.publicKey) methodLogger.debug('authCom.publicKey', authComPublicKey.asHex()) methodLogger.debug('args.publicKey', argsPublicKey.asHex()) - if (!authComPublicKey.isSame(argsPublicKey)) { + /*if (!authComPublicKey.isSame(argsPublicKey)) { throw new Error( `corrupt authentication call detected, oneTimeCode: ${authArgs.oneTimeCode} doesn't belong to caller: ${argsPublicKey.asHex()}` ) - } + }*/ const communityUuid = uuidv4Schema.safeParse(authArgs.uuid) if (!communityUuid.success) { throw new Error( diff --git a/federation/src/index.ts b/federation/src/index.ts index a4247a2cc..9e8738b80 100644 --- a/federation/src/index.ts +++ b/federation/src/index.ts @@ -35,7 +35,7 @@ async function main() { } else { const endTime = new Date() const duration = endTime.getTime() - startTime.getTime() - printServerCrashAsciiArt(logger, `reason: ${reason}`, `duration: ${duration}ms`, '') + printServerCrashAsciiArt(`reason: ${reason}`, `duration: ${duration}ms`, '') logger.error(error) } }) diff --git a/shared/package.json b/shared/package.json index 9f15c67bc..647baa1bb 100644 --- a/shared/package.json +++ b/shared/package.json @@ -34,9 +34,10 @@ }, "dependencies": { "decimal.js-light": "^2.5.1", - "esbuild": "^0.25.2", + "esbuild": "^0.25.2", "jose": "^4.14.4", "log4js": "^6.9.1", + "yoctocolors-cjs": "^2.1.2", "zod": "^3.25.61" }, "engines": { diff --git a/shared/src/helper/onShutdown.ts b/shared/src/helper/onShutdown.ts index c6e166d43..395c4274b 100644 --- a/shared/src/helper/onShutdown.ts +++ b/shared/src/helper/onShutdown.ts @@ -1,4 +1,5 @@ -import { Logger } from "log4js" +import { Logger } from 'log4js' +import colors from 'yoctocolors-cjs' export enum ShutdownReason { SIGINT = 'SIGINT', @@ -42,9 +43,9 @@ export function onShutdown(shutdownHandler: (reason: ShutdownReason, error?: Err } } -export function printServerCrashAsciiArt(logger: Logger, msg1: string, msg2: string, msg3: string) { - logger.error(` /\\_/\\ ${msg1}`) - logger.error(`( x.x ) ${msg2}`) - logger.error(`> < ${msg3}`) - logger.error('') +export function printServerCrashAsciiArt(msg1: string, msg2: string, msg3: string) { + console.error(colors.redBright(` /\\_/\\ ${msg1}`)) + console.error(colors.redBright(`( x.x ) ${msg2}`)) + console.error(colors.redBright(`> < ${msg3}`)) + console.error(colors.redBright('')) } \ No newline at end of file