middleware(EnabledOnlyOnLocalhost::class); $this->middleware(EnsureFeaturesAreActive::using(AllowExternalProfileManagement::class)); } /** * This will redirect the user to the appropriate auth service. */ public function index(ExternalTokenAuthRequest $request): RedirectResponse { /** @var ExternalProfileSite $site */ $site = ExternalProfileSite::fromLocalizedName($request->validated(ExternalProfile::ATTRIBUTE_SITE)); return $site->getAuthorizeUrl()->redirect(); } }