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

216
Visualizações
React Native connecting with firebase Error : " Please provide the appropriate client ID "

Error: Please provide the appropriate client ID

First I have created a firebase project, then I have created two apps(Android and iOS). After the creation of Android I have installed .json file, then after building the apk, from the command "expo fetch:android:hashes", I just got Google Certificate Hash (SHA-256) where I put in the fingerprint in the Google App. With the IOS I have downloaded the .plist file after the creation of the app.

Code:

const config = {
  androidClientId:
    "//ID from client_id of the google json file",
  iosClientId:
     "//ID from string of the google plist file",
  scopes: ["profile", "email"],
  permissions: ["public_profile", "email", "gender", "location"],
};

export const AuthProvider = ({ children }) => {
  const signInWithGoogle = async () => {
    await Google.logInAsync(config).then(async (loginResults) => {
      if (loginResults.type === "success") {
        //success
      }
    });
  };

  return (
    <AuthContext.Provider
      value={{
        user: null,
        signInWithGoogle,
      }}
    >
      {children}
    </AuthContext.Provider>
  );
};

export default function useAuth() {
  return useContext(AuthContext);
}

APP.js

const { signInWithGoogle } = useAuth();

  return (
    <View>
      <Button title="Login" onPress={signInWithGoogle} />
    </View>
  );

No google modal opens after this just prints out the client id error

about 4 years ago · Juan Pablo Isaza
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