@@ -208,6 +208,36 @@ const SigninPasswordlessCode = ({
208208 sessionVerified : isSessionVerified ,
209209 } ) ;
210210
211+ const navigationOptions = {
212+ email,
213+ signinData : {
214+ uid : result . uid ,
215+ sessionToken : result . sessionToken ,
216+ emailVerified : true ,
217+ sessionVerified : isSessionVerified ,
218+ ...( result . verificationMethod && {
219+ verificationMethod :
220+ result . verificationMethod as VerificationMethods ,
221+ } ) ,
222+ ...( result . verificationReason && {
223+ verificationReason :
224+ result . verificationReason as VerificationReasons ,
225+ } ) ,
226+ } ,
227+ integration,
228+ finishOAuthFlowHandler,
229+ redirectTo :
230+ isWebIntegration ( integration ) && webRedirectCheck ?. isValid
231+ ? integration . data . redirectTo
232+ : '' ,
233+ queryParams : location . search ,
234+ handleFxaLogin : true ,
235+ handleFxaOAuthLogin : true ,
236+ performNavigation : ! (
237+ integration . isFirefoxMobileClient ( ) && isSessionVerified
238+ ) ,
239+ } ;
240+
211241 // For existing users signing into Sync (signin flow), show merge warning
212242 // before navigating to set password. For signup flows, the warning was
213243 // already shown on the email-first page.
@@ -306,7 +336,12 @@ const SigninPasswordlessCode = ({
306336 redirect,
307337 state,
308338 } ) ;
309- goToSettingsWithAlertSuccess ( ) ;
339+ const { error : navError } = await handleNavigation ( navigationOptions ) ;
340+ if ( navError ) {
341+ setLocalizedErrorBannerMessage (
342+ getLocalizedErrorMessage ( ftlMsgResolver , navError )
343+ ) ;
344+ }
310345 } else {
311346 // Navigate to relying party
312347 hardNavigate ( redirect , {
@@ -336,35 +371,6 @@ const SigninPasswordlessCode = ({
336371 }
337372 }
338373 } else {
339- const navigationOptions = {
340- email,
341- signinData : {
342- uid : result . uid ,
343- sessionToken : result . sessionToken ,
344- emailVerified : true ,
345- sessionVerified : isSessionVerified ,
346- ...( result . verificationMethod && {
347- verificationMethod :
348- result . verificationMethod as VerificationMethods ,
349- } ) ,
350- ...( result . verificationReason && {
351- verificationReason :
352- result . verificationReason as VerificationReasons ,
353- } ) ,
354- } ,
355- integration,
356- finishOAuthFlowHandler,
357- redirectTo :
358- isWebIntegration ( integration ) && webRedirectCheck ?. isValid
359- ? integration . data . redirectTo
360- : '' ,
361- queryParams : location . search ,
362- handleFxaLogin : true ,
363- handleFxaOAuthLogin : true ,
364- performNavigation : ! (
365- integration . isFirefoxMobileClient ( ) && isSessionVerified
366- ) ,
367- } ;
368374 const { error : navError } = await handleNavigation ( navigationOptions ) ;
369375 if ( navError ) {
370376 setLocalizedErrorBannerMessage (
0 commit comments