Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

181
Visualizações
firebase authentication for google provider and Authorization Error 401

I try to test signin process with firebase/identity platform from GCP for firebase.auth.GoogleAuthProvider with a simple static website.

When I deploy the website I get

Authorization Error Error 401: deleted_client The OAuth client was deleted.

My webpage with javascript code looks like:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Sample FirebaseUI App</title>
    <script src="https://www.gstatic.com/firebasejs/8.0/firebase.js"></script>
    <script>
      var config = {
        apiKey: "<secret-key>",
        authDomain: "<my-gcp-project>.firebaseapp.com",
      };
      firebase.initializeApp(config);
    </script>

    <script src="https://www.gstatic.com/firebasejs/ui/6.0.0/firebase-ui-auth.js"></script>
    <link type="text/css" rel="stylesheet" href="https://www.gstatic.com/firebasejs/ui/6.0.0/firebase-ui-auth.css"/>
    <script type="text/javascript">
      // FirebaseUI config.
      var uiConfig = {
        signInSuccessUrl: 'https://<my-url-after-success-login>',
        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://<my-url-after-success-login>',
        // Privacy policy url/callback.
        privacyPolicyUrl: function () {
          window.location.assign('https://<my-url-after-success-login>');
        }
      };

      // 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);
    </script>
</head>
<body>
<!-- The surrounding HTML is left untouched by FirebaseUI.
       Your app may use that space for branding, controls and other customizations.-->
<h1>Welcome to My Awesome App</h1>
<div id="firebaseui-auth-container"></div>
</body>
</html>

When I call the deployed web-page I have this "Sign in with Google" button. But when I click it this 401 error appears.

The values for apiKey: "", authDomain: ".firebaseapp.com",

I copied from the GCP console under "APPLICATION SETUP DETAILS" Google is the only provider enabled in "Identity Platform".

Any hint is welcome. https://github.com/firebase/firebaseui-web seems a more systematic intro to this topic I just thought I get it running with minimal effort.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

My setup process was not complete. Now it is working.

https://firebase.google.com/docs/web/setup I got also 4 additional lines for the config variable now.

projectId: "<my_project_id>",
storageBucket: "<my_value>",
messagingSenderId: "<my_id>",
appId: "<my_app_id>"
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda