I have been searching for a while now and i haven't found any solution.

I'm developing a react-native application with Expo and i'm using firebase for authentification with GoogleSignIn and WebBrowser.

I have this warning on Android everytime I sign in using Google.

Any ideas how to remove this warning ?

EventEmitter.removeListener('url', ...): Method has been deprecated. Please instead use remove() on the subscription returned by EventEmitter.addListener

enter image description here

This is the code that handles it:

import { auth } from "../firebase";
import {
Text,
TextInput,
View,
StyleSheet,
TouchableOpacity,
Image,
ScrollView,
} from "react-native";
import { useTranslation } from "react-i18next";
import * as Google from "expo-auth-session/providers/google";
import {
   getAuth,
   GoogleAuthProvider,
   signInWithCredential,
} from "firebase/auth";
import * as WebBrowser from "expo-web-browser";
import { useEffect, useState } from "react";

WebBrowser.maybeCompleteAuthSession();

export default function Login({ navigation }) {
   const [email, setEmail] = useState("");
   const [password, setPassword] = useState("");
   const { t } = useTranslation();

   const [request, response, promptAsync] = Google.useIdTokenAuthRequest({
   expoClientId:"something.apps.googleusercontent.com",
   webClientId:"something.apps.googleusercontent.com",
   clientId:"something.apps.googleusercontent.com",
   });

   useEffect(() => {
      if (response?.type === "success") {
      const { id_token } = response.params;
      const auth = getAuth();
      const credential = GoogleAuthProvider.credential(id_token);
      signInWithCredential(auth, credential);
      navigation.navigate("ShowList");
      }
   }, [response]);
0

There are 0 best solutions below