ReactJS - firebase apikey is invalid

 
Vista:
Imágen de perfil de darling
Val: 2
Ha disminuido 1 puesto en ReactJS (en relación al último mes)
Gráfica de ReactJS

firebase apikey is invalid

Publicado por darling (1 intervención) el 09/08/2020 23:07:16
Desarrollando una aplicacion con react-native agregue firebase a mi proyecto y me aparece el error :
[Error: Your API key is invalid, please check you have copied it correctly.] Pero ya verifiqué la clave es la correcta.
No entiendo por que me aparece este error, si alguien pudiera ayudarme se lo agradecería.
Aqui el screen aque da el error:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// pantalla home
import React, {useContext, useEffect} from 'react';
import {View, Text, TouchableOpacity, StatusBar, Alert} from 'react-native';
import {UsuarioContext} from '@context/UsuarioContext';
import colores from '@styles/colores';
import * as firebase from 'firebase';
import {firebaseConfig} from '../../firebaseConfig';
 
export default function HomeScreen(props) {
  const [login, loginAction] = useContext(UsuarioContext);
  return (
    <View>
      <StatusBar
        backgroundColor={colores.BLUE}
        barStyle="dark-content"
        translucent={true}
      />
      <Text style={{textAlign: 'center', marginTop: 200}}>
        {' '}
        Hola mundo {props.email}{' '}
      </Text>
      <TouchableOpacity onPress={() => desconectarse()}>
        <Text>Cerrar sesión</Text>
      </TouchableOpacity>
    </View>
  );
 
  function goToScreen(routeName) {
    props.navigation.replace(routeName);
  }
 
  function desconectarse() {
    Alert.alert('Salir', 'Esta seguro que desea cerrar sesión ?', [
      {text: 'Si', onPress: () => signOut()},
      {text: 'No', onPress: () => {}, style: 'cancel'},
    ]);
  }
 
  async function signOut() {
    try {
 
      firebase
        .auth()
        .signOut()
        .then(function () {
          console.log('Sign-out successful.');
        })
        .catch(function (error) {
          console.log('acurrio un error : ');
          console.log(error.toString())
        });
 
      loginAction({type: 'sing-out', data: {}});
      goToScreen('Login');
    } catch (error) {
      console.error(error);
    }
  }
}
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder