getSchemeAndHttpHost()]; // HTTPS origins for normal environments. $origins[] = "https://{$rpId}"; // Local development allowance for localhost over HTTP. if ($rpId === 'localhost') { $origins[] = 'http://localhost'; } $factory->setAllowedOrigins(array_values(array_unique($origins))); return $factory; } }