-
Notifications
You must be signed in to change notification settings - Fork 299
feat(wp): gpg encryption for passkey auth #5013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
15834b0 to
e12f508
Compare
e12f508 to
3387cce
Compare
| assert.equal(e.message, 'Error decrypting message: Session key decryption failed.'); | ||
| } | ||
| }); | ||
| it('should not authenticate with wrong signing key', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add empty lines between tests, that looks more readable
| const keyPair = await generateGPGKeyPair('secp256k1'); | ||
| const encryptedToken = (await encryptAndSignText( | ||
| 'access_token', | ||
| keyPair.publicKey, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename the one of the keyPair object, it looks very confusing
modules/sdk-api/src/bitgoAPI.ts
Outdated
| if (!body.encryptedToken) { | ||
| throw new Error('encryptedToken is missing from response'); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (!body.encryptedToken) { | |
| throw new Error('encryptedToken is missing from response'); | |
| } | |
| else if (body.encryptedToken) { | |
| ... | |
| } else { | |
| throw new Error('Failed to login. Please contact support@bitgo.com`) | |
| } |
add gpg decryption and signature verification to passkey authentication TICKET: WP-2733
eebe859 to
2170204
Compare
add unit tests TICKET: WP-2733
2170204 to
1eda08f
Compare
Ticket: WP-2733