Updated the getAuthObject method to get the current user's access_token#15
Open
Guiradi wants to merge 1 commit intovertcitron:masterfrom
Open
Updated the getAuthObject method to get the current user's access_token#15Guiradi wants to merge 1 commit intovertcitron:masterfrom
Guiradi wants to merge 1 commit intovertcitron:masterfrom
Conversation
vertcitron
requested changes
Feb 8, 2020
Owner
vertcitron
left a comment
There was a problem hiding this comment.
Thank you for keeping alive this little piece!
As I ask further in a code comment, I just want to understand why a resolved promise with a null in place of a rejected promise with an ad-hoc message when not logged?
| if (auth.isSignedIn.get()) { | ||
| return Promise.resolve(_formatAuthObject(auth.currentUser.get())) | ||
| } else { | ||
| return Promise.resolve(null) |
Owner
There was a problem hiding this comment.
Is there a particular reason to return a null resolved promise in place of a rejected one with a not logged message?
A rejected promise should be more universal and more readable no?
There was a problem hiding this comment.
@vertcitron I'd say it is to remain consistent with the behavior of currentUser() defined below.
Owner
|
I merged a security fix on the upstream master, so if you change something on your PR, please rebase on it before. |
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.
Updated the getAuthObject method for fetch the current user's auth session data