/** * @param User $user * @throws InvalidStateException * @throws AbortException */ public function onLoggedIn(User $user) { if (!$this->presenter) { throw new InvalidStateException('Presenter not set'); } if ($this->presenter instanceof Presenter && $this->presenter->getSession(OAuth2Presenter::SESSION_NAMESPACE)->authorizationRequest) { $this->presenter->redirect(...$this->redirectConfig->getApproveDestination()); } }