From 9b5c023e0dd1f51cc069998f7c231bd8665d230a Mon Sep 17 00:00:00 2001
From: clauspeterhuebner
Date: Thu, 10 Jul 2025 23:43:15 +0200
Subject: [PATCH] more logoutputs
---
backend/src/federation/authenticateCommunities.ts | 2 +-
.../src/graphql/api/1_0/resolver/AuthenticationResolver.ts | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/backend/src/federation/authenticateCommunities.ts b/backend/src/federation/authenticateCommunities.ts
index 5fd741e7f..150c32092 100644
--- a/backend/src/federation/authenticateCommunities.ts
+++ b/backend/src/federation/authenticateCommunities.ts
@@ -29,7 +29,7 @@ export async function startCommunityAuthentication(
})
logger.debug('homeFedComA', new FederatedCommunityLoggingView(homeFedComA))
const comB = await DbCommunity.findOneByOrFail({ publicKey: fedComB.publicKey })
- logger.debug('started with comB:', comB)
+ logger.debug('started with comB:', new CommunityLoggingView(comB))
// check if communityUuid is a valid v4Uuid and not still a temporary onetimecode
try {
if (
diff --git a/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts b/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts
index ef9e32fd4..b5b34dff2 100644
--- a/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts
+++ b/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts
@@ -43,7 +43,11 @@ export class AuthenticationResolver {
logger.removeContext('handshakeID')
throw new Error(errmsg)
}
- const fedComA = await DbFedCommunity.findOneByOrFail({ publicKey: Buffer.from(args.publicKey) })
+ const pubKeyComA = Buffer.from(args.publicKey, 'hex')
+ logger.debug('pubKeyComA', pubKeyComA)
+ logger.debug('args.publicKey', args.publicKey)
+ const fedComA = await DbFedCommunity.findOneByOrFail({ publicKey: pubKeyComA })
+ logger.debug('fedComA', new FederatedCommunityLoggingView(fedComA))
if (!openConnectionJwtPayload.url.startsWith(fedComA.endPoint)) {
const errmsg = `invalid url of community with publicKey` + args.publicKey
logger.error(errmsg)