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);
    }
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);
    }
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 ) ; }
Override to change what happens after successful authentication

@param Request $request
@param TokenInterface $token
@param string $providerKey
@return RedirectResponse
Override to change what happens after successful authentication