Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase photoURL from a Google auth provider returns a jpg with colors inverted

When I authenticate a user via Firebase (below), the resulting user contains a photoURL that has inverted colors. Click this jpg url to see the color inversion: https://lh3.googleusercontent.com/-JVpfmGGJuO8/AAAAAAAAAAI/AAAAAAAAAME/sMJVq9F8gec/photo.jpg

Yet when I paste that URL into Stack Overflow's "image" editor button, it shows the image not inverted below:

enter image description here

signIn() {
    var provider = new firebase.auth.GoogleAuthProvider();
    provider.addScope('https://www.googleapis.com/auth/plus.login');
    firebase.auth().signInWithPopup(provider).then((result: any) => {
      this.user = result.user;
    })
  }

What's going on? Do I need to decompress the image somehow?

like image 469
Rose Perrone Avatar asked Mar 19 '17 23:03

Rose Perrone


People also ask

What is onAuthStateChanged in firebase?

According to the documentation, the onAuthStateChanged() function returns. The unsubscribe function for the observer. So you can just: var unsubscribe = firebase.

What is UID in firebase?

The user's UID, as assigned by Firebase Authentication, is the key item of data that you'll make use of in security rules in order to determine what that user can do with documents in Cloud Firestore when accessed directly from a web or mobile app.


1 Answers

For future adventurers to this page: This problem only exists for Alphabet employees. Query the internal search engine and you'll solve it.

like image 175
Luca Invernizzi Avatar answered Oct 24 '22 01:10

Luca Invernizzi