@@ -12,7 +12,9 @@ import {
1212 Integration ,
1313 isOAuthIntegration ,
1414 useAccount ,
15+ useAlertBar ,
1516 useAuthClient ,
17+ useFtlMsgResolver ,
1618 useSensitiveDataClient ,
1719} from '../../../models' ;
1820import {
@@ -29,6 +31,8 @@ const ResetPasswordWithRecoveryKeyVerifiedContainer = ({
2931} : ResetPasswordWithRecoveryKeyVerifiedProps & RouteComponentProps ) => {
3032 const [ showHint , setShowHint ] = useState ( false ) ;
3133
34+ const alertBar = useAlertBar ( ) ;
35+ const ftlMsgResolver = useFtlMsgResolver ( ) ;
3236 const navigateWithQuery = useNavigateWithQuery ( ) ;
3337 const sensitiveDataClient = useSensitiveDataClient ( ) ;
3438
@@ -59,10 +63,30 @@ const ResetPasswordWithRecoveryKeyVerifiedContainer = ({
5963 if ( ! recoveryKey ) {
6064 // If we get here, that means a password reset was completed (with a verified account).
6165 // Along the way, we have lost a copy of the recovery key in memory if the page was unloaded.
62- // This is fine - we navigate to the confirmed page and carry on.
63- navigateWithQuery ( '/reset_password_verified' , { replace : true } ) ;
66+ // This is fine - we navigate to the confirmed or settings page and carry on.
67+ const navigationPath = integration . isSync ( )
68+ ? '/settings'
69+ : '/reset_password_verified' ;
70+ navigateWithQuery ( navigationPath , { replace : true } ) ;
71+
72+ // For web integration and sync navigate to settings
73+ // Sync users will see an account recovery key promotion banner in settings
74+ // if they don't have one configured
75+ alertBar . success (
76+ ftlMsgResolver . getMsg (
77+ 'reset-password-complete-header' ,
78+ 'Your password has been reset'
79+ )
80+ ) ;
6481 }
65- } , [ recoveryKey , email , navigateWithQuery ] ) ;
82+ } , [
83+ recoveryKey ,
84+ email ,
85+ navigateWithQuery ,
86+ integration ,
87+ alertBar ,
88+ ftlMsgResolver ,
89+ ] ) ;
6690
6791 if ( ! recoveryKey || ! email ) {
6892 return < > </ > ;
0 commit comments