google / ground-platform

Ground hosted components: Web console, Cloud Functions, db config
http://groundplatform.org
Apache License 2.0
203 stars 83 forks source link

Fix issue with photo permissions #1830

Closed gino-m closed 2 months ago

gino-m commented 2 months ago

@lecrabe, @rfontanarosa and I worked this out today.

The problem was that we were using firebase/storage for getting the authenticated photo URLs, but angular-fire for auth. Calls to getDownloadURL() didn't have the currently authenticated user's credentials, likely because firebase/storage doesn't know anything about angular-fire, so it wasn't including the user's creds when requesting the URL of the image.

Fixes #1561.