configResolver->authIs('oidc')) { throw new \Exception('You must configure the OIDC environment variables before logging in at this route.'); } // Redirect to authorization @ OIDC provider return $oidcClient->generateAuthorizationRedirect(scopes: ['openid', 'profile']); } #[Route('/login/oidc/auth', name: 'app_login_oidc_auth')] public function oidcAuthenticate(): RedirectResponse { if (false === $this->configResolver->authIs('oidc')) { throw new \Exception('You must configure the OIDC environment variables before logging in at this route.'); } throw new \LogicException('This method can be blank - it will be intercepted by the "oidc" key on your firewall.'); } #[Route('/logout/oidc', 'app_logout_oidc')] public function oidcLogout(OidcClientInterface $oidcClient, Request $request, Security $security): RedirectResponse { // ToDo: Configure multiple authentication methods and redirect to the form login here } }