original_string: public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey)
      {
          // if the user hit a secure page and start() was called, this was
          // the URL they were on, and probably where you want to redirect to
          $targetPath = $request->getSession()->get('_security.'.$providerKey.'.target_path');
  
          if (!$targetPath) {
              $targetPath = $this->getDefaultSuccessRedirectUrl();
          }
  
          return new RedirectResponse($targetPath);
      }
code: public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey)
      {
          // if the user hit a secure page and start() was called, this was
          // the URL they were on, and probably where you want to redirect to
          $targetPath = $request->getSession()->get('_security.'.$providerKey.'.target_path');
  
          if (!$targetPath) {
              $targetPath = $this->getDefaultSuccessRedirectUrl();
          }
  
          return new RedirectResponse($targetPath);
      }
code_tokens: public function onAuthenticationSuccess ( Request $ request , TokenInterface $ token , $ providerKey ) { // if the user hit a secure page and start() was called, this was // the URL they were on, and probably where you want to redirect to $ targetPath = $ request -> getSession ( ) -> get ( '_security.' . $ providerKey . '.target_path' ) ; if ( ! $ targetPath ) { $ targetPath = $ this -> getDefaultSuccessRedirectUrl ( ) ; } return new RedirectResponse ( $ targetPath ) ; }
docstring: Override to change what happens after successful authentication
  
  @param Request $request
  @param TokenInterface $token
  @param string $providerKey
  @return RedirectResponse
docstring_tokens: Override to change what happens after successful authentication