Fixed storage get_url() token bug#417
Open
hereisamara wants to merge 2 commits intothisbejim:masterfrom
Open
Conversation
marcbrs
approved these changes
May 3, 2022
marcbrs
approved these changes
May 3, 2022
|
Hi there, I've initiated a project to maintain this library, and I'll be using your solution to fix the mentioned bug. I'll co-author you in the commit of the fix, as I've modified it a bit. Feel free to reach me using my email displayed in my profile. Repo: firebase-rest-api available in PyPI best regards |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current get_url method takes the bearer token as a token URL parameter which in fact is a different token, named access token or download token.
I have changed the method so that it works for all types of firebase storage rules by retrieving the access token first and passing it into the URL.
Before the get_url() method returns

After changes, it returns the url with correct token
