Firebase Storage Authentication Issues

I am trying to download images from the Firebase repository, but am getting errors.

E/StorageUtil: error getting token java.util.concurrent.ExecutionException: com.google.android.gms.internal.zzanu: Please sign in before trying to get a token.
W/NetworkRequest: no auth token for request

However, I have my rules:

service firebase.storage {
    match /b/<myappnameredacted>.appspot.com/o {
        match /{allPaths=**} {
            allow read, write;
        }
    }
}
+4
source share
1 answer

Your rules are not like Firebase Storage Rules Rules Documentation .

To make all your files public (for everyone), use:

// Anyone can read or write to the bucket, even non-users of your app.
// Because it is shared with Google App Engine, this will also make
// files uploaded via Google App Engine public.

service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write;
    }
  }
}

To make all your files readable (for all), use:

service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read;
    }
  }
}

You can also only make your readable / writable image, see the Firebase Storage Security Rules Documentation .

0
source

Source: https://habr.com/ru/post/1659632/


All Articles