Access to Firebase Storage in Flutter

后端 未结 1 1424
甜味超标
甜味超标 2021-01-06 23:44

I\'m fairly new to Flutter and haven\'t ever used Firebase before so my aplogies if there is an obvious solution to this.

I\'m working on a Flutter app which invol

1条回答
  •  悲&欢浪女
    2021-01-07 00:20

    Quoting from your StorageException:

    User does not have permission to access this object.

    This is what you would expect because your rules state the following:

    allow read, write: if request.auth != null;
    

    Firebase uses authentication.

    There are two options to solve this:

    • Either you authenticate your users with Firebase using the firebase_auth plugin

    • Or you make your files publicly available by changing your rules to allow read, write;

    The Storage Rules documentation contains information about integrating Firebase Authentication.

    0 讨论(0)
提交回复
热议问题