Skip to content

Commit

Permalink
fix: move otp timer
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelpeixe committed Dec 18, 2023
1 parent 391a9e5 commit d952411
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/reader-activation/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,10 +533,10 @@ window.newspackRAS.push( function ( readerActivation ) {
}
const otpHash = readerActivation.getOTPHash();
if ( otpHash && [ 'register', 'link' ].includes( action ) ) {
// Set OTP rate-limit timer
readerActivation.setOTPTimer();
handleOTPTimer();
if ( status === 200 ) {
// Set OTP rate-limit timer
readerActivation.setOTPTimer();
handleOTPTimer();
setFormAction( 'otp' );
}
/** If action is link, suppress message and status so the OTP handles it. */
Expand Down

0 comments on commit d952411

Please sign in to comment.