Closed
Bug 1229023
Opened 9 years ago
Closed 9 years ago
Fetch and expose Firefox Accounts profile data
Categories
(Firefox OS Graveyard :: FxA, defect, P3)
Tracking
(firefox45 fixed)
RESOLVED
FIXED
2.6 S2 - 12/4
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: ferjm, Assigned: ferjm)
References
Details
Attachments
(1 file)
7.14 KB,
patch
|
markh
:
review+
|
Details | Diff | Splinter Review |
We need to expose information like the FxA user name and avatar in B2G.
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8694252 -
Flags: review?(markh)
Comment 2•9 years ago
|
||
Adding some FxA team folks just for situational awareness; cool to see this moving forward!
Comment 3•9 years ago
|
||
Comment on attachment 8694252 [details] [diff] [review]
v1
Review of attachment 8694252 [details] [diff] [review]:
-----------------------------------------------------------------
It's a bit of a shame about the duplication in FxAccountsManager.jsm, but that already existed. It looks fine to me.
::: services/fxaccounts/FxAccountsManager.jsm
@@ +62,5 @@
>
> return {
> email: this._activeSession.email,
> + verified: this._activeSession.verified,
> + profile: this._activeSession.profile
I'd suggest a trailing "," here so the next change doesn't need to touch this line.
@@ +432,5 @@
> if (!user.verified) {
> this.verificationStatus(user);
> + // Trying to get the profile for unverified users will fail, so we
> + // don't even try in that case.
> + log.debug("Account " + JSON.stringify(this._user));
You can write this as |log.debug("Account", this._user);| and Log.jsm will stringify it for you (and ditto below)
@@ +443,5 @@
> + }
> + log.debug("Account " + JSON.stringify(this._user));
> + return Promise.resolve(this._user);
> + }).catch(error => {
> + log.debug("Account " + JSON.stringify(this._user));
Shouldn't we log error? And I think you can just return |this._user| without wrapping it in a promise.
@@ +512,5 @@
> + this._fxAccounts.getSignedInUserProfile().then(profile => {
> + if (profile) {
> + this._activeSession.profile = profile;
> + }
> + });
we probably need a trailing .catch which logs here as the promise isn't returned - a rejection would result in one of those "an unhandled rejection" messages.
Attachment #8694252 -
Flags: review?(markh) → review+
Assignee | ||
Comment 4•9 years ago
|
||
Assignee | ||
Comment 5•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b7dd3ffbf52b18e9d58c27abb7ed67c4a2208686
Bug 1229023 - Fetch and expose Firefox Accounts profile data. r=markh
Comment 6•9 years ago
|
||
bugherder |
You need to log in
before you can comment on or make changes to this bug.
Description
•