简体   繁体   中英

Firebase extension Delete User Data doesn't work for {DEFAULT} bucket

I have installed Firebase extension Delete User Data which triggers of user deletion. I have mentioned the storage paths as per the provided instructions.

Where in Google Cloud Storage do you store user data? Leave empty if you don't use Cloud Storage. Enter the full paths to files or directories in your Storage buckets, separated by commas. Use {UID} to represent the User ID of the deleted user, and use {DEFAULT} to represent your default Storage bucket. Here's a series of examples. To delete all the files in your default bucket with the file naming scheme {UID}-pic.png, enter {DEFAULT}/{UID}-pic.png. To also delete all the files in another bucket called my-app-logs with the file naming scheme {UID}-logs.txt, enter {DEFAULT}/{UID}-pic.png,my-app-logs/{UID}-logs.txt. To also delete a User ID-labeled directory and all its files (like media/{UID}), enter {DEFAULT}/{UID}-pic.png,my-app-logs/{UID}-logs.txt,{DEFAULT}/media/{UID}

Cloud Storage Paths: {DEFAULT}/profilepic/{UID}.jpeg I am always getting the following log

File: 'profilepic/uid_1234.jpeg' does not exist in Cloud Storage, skipping 

It has been report in the github issues for firebase extension. For Extension version: 0.1.7 check the temporary fix by using your storage bucket name instead of DEFAULT.

To find your bucket name:

Go to your Storage dashboard in the Firebase console. Click the Files tab, then look in the header of the file viewer. Copy the URL to your clipboard. It's usually in the form project-id.appspot.com.

Instead of

{DEFAULT}/profilePhotos/{UID}.jpg

use:

your-project.appspot.com/profilePhotos/{UID}.jpg

where your-project.appspot.com is your bucket name. I am not sure the latest extension 0.1.8 fixed the issue

Source

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM