File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @keeper-security/keeperapi" ,
3
3
"description" : " Keeper API Javascript SDK" ,
4
- "version" : " 16.0.52 " ,
4
+ "version" : " 16.0.53 " ,
5
5
"browser" : " dist/index.es.js" ,
6
6
"main" : " dist/index.cjs.js" ,
7
7
"types" : " dist/node/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -684,14 +684,19 @@ export class Auth {
684
684
685
685
const processPushNotification = ( wssRs : Record < string , any > ) => {
686
686
if ( wssRs . event === 'received_totp' ) {
687
- const token = wssRs . encryptedLoginToken ? normal64Bytes ( wssRs . encryptedLoginToken ) : loginToken
688
- if ( wssRs . passcode ) {
687
+ // Duo
688
+ if ( wssRs . encryptedLoginToken ) {
689
+ const token = normal64Bytes ( wssRs . encryptedLoginToken )
690
+ resumeWithToken ( token )
691
+ }
692
+ // DNA
693
+ else if ( wssRs . passcode ) {
689
694
const tfaChannel = channels . find ( x => x . channel === DeviceVerificationMethods . TFA )
690
695
if ( tfaChannel && tfaChannel . validateCode ) {
691
696
tfaChannel . validateCode ( wssRs . passcode )
692
697
}
693
698
} else {
694
- resumeWithToken ( token )
699
+ // do nothing, we don't leak rejection during device approvals
695
700
}
696
701
} else if ( wssRs . message === 'device_approved' ) {
697
702
if ( wssRs . approved ) {
@@ -871,10 +876,13 @@ export class Auth {
871
876
872
877
const processPushNotification = ( wssRs : Record < string , any > ) => {
873
878
if ( wssRs . event === 'received_totp' ) {
879
+ // Duo
874
880
if ( wssRs . encryptedLoginToken ) {
875
881
const token = normal64Bytes ( wssRs . encryptedLoginToken )
876
882
resumeWithToken ( token )
877
- } else if ( wssRs . passcode ) {
883
+ }
884
+ // DNA
885
+ else if ( wssRs . passcode ) {
878
886
( async ( ) => {
879
887
await submitCode ( lastPushChannel , wssRs . passcode )
880
888
} ) ( )
You can’t perform that action at this time.
0 commit comments