title: firebase authentication for google provider and Authorization Error 401
body: <p>I try to test signin process with firebase/identity platform from GCP for <code>firebase.auth.GoogleAuthProvider</code> with a simple static website.</p>
  <p>When I deploy the website I get</p>
  <blockquote>
  <p>Authorization Error
  Error 401: deleted_client
  The OAuth client was deleted.</p>
  </blockquote>
  <p>My webpage with javascript code looks like:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;title&gt;Sample FirebaseUI App&lt;/title&gt;
      &lt;script src=&quot;https://www.gstatic.com/firebasejs/8.0/firebase.js&quot;&gt;&lt;/script&gt;
      &lt;script&gt;
        var config = {
          apiKey: &quot;&lt;secret-key&gt;&quot;,
          authDomain: &quot;&lt;my-gcp-project&gt;.firebaseapp.com&quot;,
        };
        firebase.initializeApp(config);
      &lt;/script&gt;
  
      &lt;script src=&quot;https://www.gstatic.com/firebasejs/ui/6.0.0/firebase-ui-auth.js&quot;&gt;&lt;/script&gt;
      &lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;https://www.gstatic.com/firebasejs/ui/6.0.0/firebase-ui-auth.css&quot;/&gt;
      &lt;script type=&quot;text/javascript&quot;&gt;
        // FirebaseUI config.
        var uiConfig = {
          signInSuccessUrl: 'https://&lt;my-url-after-success-login&gt;',
          signInOptions: [
            // Leave the lines as is for the providers you want to offer your users.
            firebase.auth.GoogleAuthProvider.PROVIDER_ID
          ],
          // tosUrl and privacyPolicyUrl accept either url string or a callback
          // function.
          // Terms of service url/callback.
          tosUrl: 'https://&lt;my-url-after-success-login&gt;',
          // Privacy policy url/callback.
          privacyPolicyUrl: function () {
            window.location.assign('https://&lt;my-url-after-success-login&gt;');
          }
        };
  
        // Initialize the FirebaseUI Widget using Firebase.
        var ui = new firebaseui.auth.AuthUI(firebase.auth());
        // The start method will wait until the DOM is loaded.
        ui.start('#firebaseui-auth-container', uiConfig);
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;!-- The surrounding HTML is left untouched by FirebaseUI.
         Your app may use that space for branding, controls and other customizations.--&gt;
  &lt;h1&gt;Welcome to My Awesome App&lt;/h1&gt;
  &lt;div id=&quot;firebaseui-auth-container&quot;&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>When I call the deployed web-page I have this &quot;Sign in with Google&quot; button.
  But when I click it this 401 error appears.</p>
  <p>The values for
  apiKey: &quot;&quot;,
  authDomain: &quot;.firebaseapp.com&quot;,</p>
  <p>I copied from the GCP console under &quot;APPLICATION SETUP DETAILS&quot;
  Google is the only provider enabled in &quot;Identity Platform&quot;.</p>
  <p>Any hint is welcome. <a href="https://github.com/firebase/firebaseui-web" rel="nofollow noreferrer">https://github.com/firebase/firebaseui-web</a> seems a more systematic intro to this topic I just thought I get it running with minimal effort.</p>