Skip to content

Commit 6b2e53d

Browse files
tegefaulkesCMCDragonkai
authored andcommitted
fix: removed identityId parameter from polykey identities authenticate
[ci skip]
1 parent f7359a0 commit 6b2e53d

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

src/bin/identities/CommandAuthenticate.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,10 @@ class CommandAuthenticate extends CommandPolykey {
1616
'Name of the digital identity provider',
1717
parsers.parseProviderId,
1818
);
19-
this.argument(
20-
'<identityId>',
21-
'Digital identity to authenticate',
22-
parsers.parseIdentityId,
23-
);
2419
this.addOption(binOptions.nodeId);
2520
this.addOption(binOptions.clientHost);
2621
this.addOption(binOptions.clientPort);
27-
this.action(async (providerId, identityId, options) => {
22+
this.action(async (providerId, options) => {
2823
const { default: PolykeyClient } = await import('../../PolykeyClient');
2924
const identitiesPB = await import(
3025
'../../proto/js/polykey/v1/identities/identities_pb'
@@ -59,7 +54,6 @@ class CommandAuthenticate extends CommandPolykey {
5954
});
6055
const providerMessage = new identitiesPB.Provider();
6156
providerMessage.setProviderId(providerId);
62-
providerMessage.setIdentityId(identityId);
6357
await binUtils.retryAuthentication(async (auth) => {
6458
genReadable = pkClient.grpcClient.identitiesAuthenticate(
6559
providerMessage,
@@ -90,7 +84,7 @@ class CommandAuthenticate extends CommandPolykey {
9084
case identitiesPB.AuthenticationProcess.StepCase.RESPONSE: {
9185
const authResponse = message.getResponse()!;
9286
this.logger.info(
93-
`Authenticated digital identity provider ${providerId} with identity ${identityId}`,
87+
`Authenticated digital identity provider ${providerId}`,
9488
);
9589
process.stdout.write(
9690
binUtils.outputFormatter({

src/identities/IdentitiesManager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class IdentitiesManager {
244244
const identities = await provider.getAuthIdentityIds();
245245
if (!identities.includes(identityId)) {
246246
throw new identitiesErrors.ErrorProviderIdentityMissing(
247-
`Authenticated identities: ${JSON.stringify(identities)}`
247+
`Authenticated identities: ${JSON.stringify(identities)}`,
248248
);
249249
}
250250
// Create identity claim on our node
@@ -260,11 +260,11 @@ class IdentitiesManager {
260260
async (token) => {
261261
// Publishing in the callback to avoid adding bad claims
262262
const claim = token.toSigned();
263-
const asd = await provider.publishClaim(
263+
const identitySignedClaim = await provider.publishClaim(
264264
identityId,
265265
claim as SignedClaim<ClaimLinkIdentity>,
266266
);
267-
publishedClaimProm.resolveP(asd);
267+
publishedClaimProm.resolveP(identitySignedClaim);
268268
return token;
269269
},
270270
tran,

0 commit comments

Comments
 (0)