<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic JS Client: Chrome login popup when authentication fails in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/js-client-chrome-login-popup-when-authentication-fails/m-p/321424#M8425</link>
    <description>&lt;P&gt;Hello community&lt;/P&gt;
&lt;P&gt;I'm having some problems with chrome and the basic authentication (jquery) with the javascript client from nuxeo. I have a form based login which works fine when the credentials are ok, but when the authentication fails, I get a popup from chrome asking for the credentials again. I have spent some time doing research and found out that this happens because chrome is getting a 401 response, and it automatically shows the popup. I tried several solutions as altering the Authorization header to other thing than "Basic ..." but I haven't had any luck. I wonder if any of you guys have come across this before and found a workaround.&lt;/P&gt;
&lt;P&gt;This is my connection code, nuxeo's js library is untouched.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;
        var nuxeoclient = new nuxeo.Client({
            baseURL: 'http://localhost:8080/nuxeo',
            restPath: 'site/api/v1',
            automationPath: 'site/api/v1/automation',
            auth: {
                method: 'basic',
                username: form.username.value,
                password: form.password.value
            },
            timeout: 30000

        })
        var h = nuxeoclient._headers;
        nuxeoclient._computeAuthentication(h);

        nuxeoclient.connect(function(error, client) {
            if (error) {
                //do stuff
            }else{
                ///blah blah
            }
        });
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 15 Sep 2015 22:38:21 GMT</pubDate>
    <dc:creator>Ezequiel_Leyton</dc:creator>
    <dc:date>2015-09-15T22:38:21Z</dc:date>
    <item>
      <title>JS Client: Chrome login popup when authentication fails</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/js-client-chrome-login-popup-when-authentication-fails/m-p/321424#M8425</link>
      <description>&lt;P&gt;Hello community&lt;/P&gt;
&lt;P&gt;I'm having some problems with chrome and the basic authentication (jquery) with the javascript client from nuxeo. I have a form based login which works fine when the credentials are ok, but when the authentication fails, I get a popup from chrome asking for the credentials again. I have spent some time doing research and found out that this happens because chrome is getting a 401 response, and it automatically shows the popup. I tried several solutions as altering the Authorization header to other thing than "Basic ..." but I haven't had any luck. I wonder if any of you guys have come across this before and found a workaround.&lt;/P&gt;
&lt;P&gt;This is my connection code, nuxeo's js library is untouched.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;
        var nuxeoclient = new nuxeo.Client({
            baseURL: 'http://localhost:8080/nuxeo',
            restPath: 'site/api/v1',
            automationPath: 'site/api/v1/automation',
            auth: {
                method: 'basic',
                username: form.username.value,
                password: form.password.value
            },
            timeout: 30000

        })
        var h = nuxeoclient._headers;
        nuxeoclient._computeAuthentication(h);

        nuxeoclient.connect(function(error, client) {
            if (error) {
                //do stuff
            }else{
                ///blah blah
            }
        });
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Sep 2015 22:38:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/js-client-chrome-login-popup-when-authentication-fails/m-p/321424#M8425</guid>
      <dc:creator>Ezequiel_Leyton</dc:creator>
      <dc:date>2015-09-15T22:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: JS Client: Chrome login popup when authentication fails</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/js-client-chrome-login-popup-when-authentication-fails/m-p/321425#M8426</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You can add the &lt;CODE&gt;X-No-Basic-Header&lt;/CODE&gt; header to avoid browser popup for authentication.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;...
client.header('X-No-Basic-Header', true);
client.connect(...)
...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Sep 2015 14:39:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/js-client-chrome-login-popup-when-authentication-fails/m-p/321425#M8426</guid>
      <dc:creator>Thomas_Roger</dc:creator>
      <dc:date>2015-09-16T14:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: JS Client: Chrome login popup when authentication fails</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/js-client-chrome-login-popup-when-authentication-fails/m-p/321426#M8427</link>
      <description>&lt;P&gt;Thank you Thomas, it worked!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2015 14:32:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/js-client-chrome-login-popup-when-authentication-fails/m-p/321426#M8427</guid>
      <dc:creator>Ezequiel_Leyton</dc:creator>
      <dc:date>2015-09-17T14:32:35Z</dc:date>
    </item>
  </channel>
</rss>

