Skip to content

Commit f03c12f

Browse files
committed
fix(auth): restore sign-in otp ui
1 parent 64948c6 commit f03c12f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

assets/reader-activation/auth.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,13 @@ window.newspackRAS.push( function ( readerActivation ) {
424424
if ( otpHash && [ 'register', 'link' ].includes( action ) ) {
425425
setFormAction( 'otp' );
426426
}
427-
form.endLoginFlow( message, res.status, data, redirect );
427+
let status = res.status;
428+
/** If action is link, suppress message and status so the OTP handles it. */
429+
if ( action === 'link' ) {
430+
status = null;
431+
message = null;
432+
}
433+
form.endLoginFlow( message, status, data, redirect );
428434
} )
429435
.catch( () => {
430436
form.endLoginFlow();

0 commit comments

Comments
 (0)