Skip to content

Commit 4db5da7

Browse files
committed
Fix the accidental code change
1 parent 93831e8 commit 4db5da7

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/index.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ export default class AuthnWidget {
3939
'OAUTH_DEVICE_COMPLETED'
4040
]
4141

42+
const oneTimeDeviceOtpStates = [
43+
'ONE_TIME_DEVICE_OTP_METHOD_TYPE_INPUT_REQUIRED',
44+
'ONE_TIME_DEVICE_OTP_INPUT_REQUIRED'
45+
]
46+
4247
return ['USERNAME_PASSWORD_REQUIRED', 'MUST_CHANGE_PASSWORD', 'CHANGE_PASSWORD_EXTERNAL', 'NEW_PASSWORD_RECOMMENDED',
4348
'NEW_PASSWORD_REQUIRED', 'SUCCESSFUL_PASSWORD_CHANGE', 'ACCOUNT_RECOVERY_USERNAME_REQUIRED',
4449
'ACCOUNT_RECOVERY_OTL_VERIFICATION_REQUIRED', 'RECOVERY_CODE_REQUIRED', 'PASSWORD_RESET_REQUIRED',
@@ -56,8 +61,10 @@ export default class AuthnWidget {
5661
'VOICE_PAIRING_TARGET_REQUIRED', 'VOICE_ACTIVATION_REQUIRED', 'TOTP_ACTIVATION_REQUIRED', 'PLATFORM_ACTIVATION_REQUIRED',
5762
'SECURITY_KEY_ACTIVATION_REQUIRED', 'MOBILE_ACTIVATION_REQUIRED', 'MFA_DEVICE_PAIRING_METHOD_FAILED',
5863
'VIP_ENROLLMENT', 'VIP_CREDENTIAL_REQUIRED', 'VIP_AUTHENTICATION_REQUIRED', 'VIP_CREDENTIAL_RESET_REQUIRED',
59-
'USER_ID_REQUIRED', 'AUTHENTICATOR_SELECTION_REQUIRED', 'INPUT_REQUIRED', 'ENTRUST_FAILED', 'FRAUD_EVALUATION_CHECK_REQUIRED', 'AUTHENTICATION_CODE_RESPONSE_REQUIRED']
60-
.concat(oauthUserAuthorizationStates);
64+
'USER_ID_REQUIRED', 'AUTHENTICATOR_SELECTION_REQUIRED', 'INPUT_REQUIRED', 'ENTRUST_FAILED', 'FRAUD_EVALUATION_CHECK_REQUIRED', 'AUTHENTICATION_CODE_RESPONSE_REQUIRED'
65+
]
66+
.concat(oauthUserAuthorizationStates)
67+
.concat(oneTimeDeviceOtpStates);
6168
}
6269

6370
static get COMMUNICATION_ERROR_MSG() {
@@ -127,13 +134,16 @@ export default class AuthnWidget {
127134
this.handleAgentlessSignOn = this.handleAgentlessSignOn.bind(this);
128135
this.postEmptyAuthentication = this.postEmptyAuthentication.bind(this);
129136
this.handleMfaDeviceSelection = this.handleMfaDeviceSelection.bind(this);
137+
this.handleMfaOneTimeDeviceSelection = this.handleMfaOneTimeDeviceSelection.bind(this);
130138
this.handleMfaSetDefaultDeviceSelection = this.handleMfaSetDefaultDeviceSelection.bind(this);
131139
this.handleAddMfaMethod = this.handleAddMfaMethod.bind(this);
132140
this.handleCancelAddMfaMethod = this.handleCancelAddMfaMethod.bind(this);
133141
this.handleContinueAddMfaMethod = this.handleContinueAddMfaMethod.bind(this);
134142
this.registerMfaEventHandler = this.registerMfaEventHandler.bind(this);
143+
this.registerMfaOneTimeDeviceChangeEventHandler = this.registerMfaOneTimeDeviceChangeEventHandler.bind(this);
135144
this.registerMfaChangeDeviceEventHandler = this.registerMfaChangeDeviceEventHandler.bind(this);
136145
this.handleMfaDeviceChange = this.handleMfaDeviceChange.bind(this);
146+
this.handleMfaOneTimeDeviceChange = this.handleMfaOneTimeDeviceChange.bind(this);
137147
this.registerMfaUsePasscodeEventHandler = this.registerMfaUsePasscodeEventHandler.bind(this);
138148
this.handleMfaUsePasscode = this.handleMfaUsePasscode.bind(this);
139149
this.postPushNotificationWait = this.postPushNotificationWait.bind(this);
@@ -144,6 +154,7 @@ export default class AuthnWidget {
144154
this.checkSecurIdPinReset = this.checkSecurIdPinReset.bind(this);
145155
this.postAssertionRequired = this.postAssertionRequired.bind(this);
146156
this.postTOTPActivationRequired = this.postTOTPActivationRequired.bind(this);
157+
this.postOTPRequired = this.postOTPRequired.bind(this);
147158
this.postAuthenticationCodeResponseRequired = this.postAuthenticationCodeResponseRequired.bind(this);
148159
this.postPlatformDeviceActivationRequired = this.postPlatformDeviceActivationRequired.bind(this);
149160
this.postSecurityKeyDeviceActivationRequired = this.postSecurityKeyDeviceActivationRequired.bind(this);
@@ -189,8 +200,11 @@ export default class AuthnWidget {
189200
this.addPostRenderCallback('MFA_COMPLETED', this.postContinueAuthentication);
190201
this.addEventHandler('DEVICE_SELECTION_REQUIRED', this.registerMfaEventHandler);
191202
this.addPostRenderCallback('DEVICE_SELECTION_REQUIRED', this.postDeviceSelectionRequired);
203+
this.addEventHandler('ONE_TIME_DEVICE_OTP_METHOD_TYPE_INPUT_REQUIRED', this.registerMfaEventHandler);
204+
this.addEventHandler('ONE_TIME_DEVICE_OTP_INPUT_REQUIRED', this.registerMfaOneTimeDeviceChangeEventHandler);
192205
this.addEventHandler('OTP_REQUIRED', this.registerMfaEventHandler);
193206
this.addEventHandler('OTP_REQUIRED', this.registerMfaChangeDeviceEventHandler);
207+
this.addPostRenderCallback('OTP_REQUIRED', this.postOTPRequired);
194208
this.addEventHandler('ASSERTION_REQUIRED', this.registerMfaEventHandler);
195209
this.addEventHandler('ASSERTION_REQUIRED', this.registerMfaChangeDeviceEventHandler);
196210
this.addPostRenderCallback('ASSERTION_REQUIRED', this.postAssertionRequired);

0 commit comments

Comments
 (0)