Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

116
Vistas
is there a way to exclude displayName on GoogleSignIn

I don't want to retrieve the user name or profile photo that the user has on their Google Account.

export async function signUpGoogle() {
try {
    const result = await Google.logInAsync({
        androidClientId: GOOGLE_ANDROID_CLIENT_ID,
        iosClientId: GOOGLE_IOS_CLIENT_ID,
        scopes: ["email"],
    });

    //console.log(result);

    if (result.type === "success") {
        const credential = GoogleAuthProvider.credential(result.idToken);

        signInWithCredential(auth, credential).catch((error) => {
            console.log(error);
        });
    } else {
        console.log("cancelled");
    }
} catch (e) {
    return { error: true };
}}

The code I use for GoogleSignIn is above.

versions:

"expo": "~44.0.0",
"expo-google-app-auth": "~8.3.0",
"firebase": "^9.1.3",
"@react-native-firebase/auth": "^12.9.3",
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

This should help

    const { user } = await auth.signInWithCredential(credential);
    const user = {
      photoURL: user.photoURL,
      displayName: user.displayName ?? 'User',
      uid: user.uid,
      email: user.email,
    };
about 4 years ago · Juan Pablo Isaza Denunciar

0

When you sign in with Google, the result that you get contains all that information, the UID, the display name, the profile picture URL. There is no way to exclude those fields. If you don't want to use them, then simply ignore them.

However, if don't want to get user details, then you should consider implementing Firebase Anonymous Authentication. In this way, you'll only have a UID, that can be only used to differentiate users. That's it.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda