private function buildUrl($return = null): string
    {
        if (is_null($return)) {
            $return = url('/', [], Config::get('steam-auth.https'));
        }
        if (! is_null($return) && ! $this->validateUrl($return)) {
            throw new RuntimeException('The return URL must be a valid URL with a URI scheme or http or https.');
        }

        $realm = Config::get('steam-auth.realm', $this->request->server('HTTP_HOST'));
        $params = [
            'openid.ns' => self::OPENID_NS,
            'openid.mode' => 'checkid_setup',
            'openid.return_to' => $return,
            'openid.realm' => (Config::get('steam-auth.https') ? 'https' : 'http').'://'.$realm,
            'openid.identity' => 'http://specs.openid.net/auth/2.0/identifier_select',
            'openid.claimed_id' => 'http://specs.openid.net/auth/2.0/identifier_select',
        ];

        return self::OPENID_URL.'?'.http_build_query($params, '', '&');
    }
private function buildUrl($return = null): string
    {
        if (is_null($return)) {
            $return = url('/', [], Config::get('steam-auth.https'));
        }
        if (! is_null($return) && ! $this->validateUrl($return)) {
            throw new RuntimeException('The return URL must be a valid URL with a URI scheme or http or https.');
        }

        $realm = Config::get('steam-auth.realm', $this->request->server('HTTP_HOST'));
        $params = [
            'openid.ns' => self::OPENID_NS,
            'openid.mode' => 'checkid_setup',
            'openid.return_to' => $return,
            'openid.realm' => (Config::get('steam-auth.https') ? 'https' : 'http').'://'.$realm,
            'openid.identity' => 'http://specs.openid.net/auth/2.0/identifier_select',
            'openid.claimed_id' => 'http://specs.openid.net/auth/2.0/identifier_select',
        ];

        return self::OPENID_URL.'?'.http_build_query($params, '', '&');
    }
private function buildUrl ( $ return = null ) : string { if ( is_null ( $ return ) ) { $ return = url ( '/' , [ ] , Config :: get ( 'steam-auth.https' ) ) ; } if ( ! is_null ( $ return ) && ! $ this -> validateUrl ( $ return ) ) { throw new RuntimeException ( 'The return URL must be a valid URL with a URI scheme or http or https.' ) ; } $ realm = Config :: get ( 'steam-auth.realm' , $ this -> request -> server ( 'HTTP_HOST' ) ) ; $ params = [ 'openid.ns' => self :: OPENID_NS , 'openid.mode' => 'checkid_setup' , 'openid.return_to' => $ return , 'openid.realm' => ( Config :: get ( 'steam-auth.https' ) ? 'https' : 'http' ) . '://' . $ realm , 'openid.identity' => 'http://specs.openid.net/auth/2.0/identifier_select' , 'openid.claimed_id' => 'http://specs.openid.net/auth/2.0/identifier_select' , ] ; return self :: OPENID_URL . '?' . http_build_query ( $ params , '' , '&' ) ; }
Build the Steam login URL.

@param string|null $return A custom return to URL

@return string
Build the Steam login URL .