File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,19 @@ public function __construct(private readonly CustomerSession $customerSession)
1313    {
1414    }
1515
16+     public  function  beforeGetRedirect (Redirect   $ subject ): array 
17+     {
18+         $ beforeAuthUrl  = $ this  ->session ->getBeforeAuthUrl (false );
19+         if  ($ beforeAuthUrl ) {
20+             $ this  ->customerSession ->setBefore2faUrl ($ beforeAuthUrl );
21+         }
22+ 
23+         return  [];
24+     }
25+ 
1626    public  function  afterGetRedirectCookie (Redirect   $ subject , ?string  $ result ): ?string 
1727    {
18-         if  ($ result && ! $ this -> customerSession -> getBefore2faUrl ( false ) ) {
28+         if  ($ result ) {
1929            $ this  ->customerSession ->setBefore2faUrl ($ result );
2030        }
2131
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public function __construct(
3131    public  function  afterExecute (LoginPost   $ subject , Redirect   $ result ): Redirect 
3232    {
3333        if  (!$ this  ->config ->isEnabled ()) {
34-             return  $ this  ;
34+             return  $ result  ;
3535        }
3636
3737        if  ($ this  ->customerSession ->get2faSuccessful ()) {
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments