android - No permission to access this object error -
i trying upload files using firebase. code works fine on devices internal storage while trying on devices external storage(sd card) shows user not have permission access object. code: -13021 httpresult: 403
error.
my manifest file contains following permissions
<uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_wifi_state" /> <uses-permission android:name="android.permission.write_external_storage" /> <uses-permission android:name="android.permission.read_external_storage" />
the default security rules storage buckets require sign in firebase authentication. can use authentication method. @ minimum, must anonymous signin by:
- enable anonymous signin in "auth" tab of firebase website
- follow steps here add code sign in: https://firebase.google.com/docs/auth/android/anonymous-auth#authenticate-with-firebase-anonymously
you can set rules allow access -- including have not yet authenticated. but not recommended data not secure.
you need use request.auth
in rules instead of auth
.
see storageexception: storageexception has occurred. user not have permission access object.
also secure user data more idea.
i hope helps you.
Comments
Post a Comment