mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
treat publicKey without hex
This commit is contained in:
parent
6ca275fa30
commit
df34bf9b43
@ -24,7 +24,7 @@ export async function startCommunityAuthentication(
|
||||
// eslint-disable-next-line camelcase
|
||||
if (client instanceof V1_0_AuthenticationClient) {
|
||||
const args = new OpenConnectionArgs()
|
||||
args.publicKey = homeCom.publicKey.toString('hex')
|
||||
args.publicKey = homeCom.publicKey.toString()
|
||||
// TODO encrypt url with foreignCom.publicKey and sign it with homeCom.privateKey
|
||||
args.url = homeFedCom.endPoint.endsWith('/')
|
||||
? homeFedCom.endPoint
|
||||
|
||||
@ -22,7 +22,7 @@ export class AuthenticationResolver {
|
||||
|
||||
// first find with args.publicKey the community, which starts openConnection request
|
||||
const requestedCom = await DbCommunity.findOneBy({
|
||||
publicKey: Buffer.from(args.publicKey, 'hex'),
|
||||
publicKey: Buffer.from(args.publicKey),
|
||||
})
|
||||
if (!requestedCom) {
|
||||
throw new LogError(`unknown requesting community with publicKey`, args.publicKey)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user