Closed Bug 1065052 Opened 10 years ago Closed 10 years ago

Implement modified Loop FxA registration flow using a second Loop registration

Categories

(Hello (Loop) :: Client, defect)

defect
Not set
normal
Points:
5

Tracking

(firefox34 fixed, firefox35 fixed)

RESOLVED FIXED
mozilla35
Iteration:
35.1
Tracking Status
firefox34 --- fixed
firefox35 --- fixed

People

(Reporter: MattN, Assigned: MattN)

References

Details

(Whiteboard: [loop-uplift])

Attachments

(1 file)

Attachment #8486612 - Flags: review?(jaws)
Attachment #8486612 - Flags: review?(adam)
Flags: qe-verify-
Flags: firefox-backlog+
Iteration: --- → 35.1
Points: --- → 5
Comment on attachment 8486612 [details] [diff] [review] v.1 Second registration to the loop server Review of attachment 8486612 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me. ::: browser/components/loop/MozLoopAPI.jsm @@ +337,5 @@ > hawkRequest: { > enumerable: true, > writable: true, > value: function(path, method, payloadObj, callback) { > + // XXX Should take a sessionType parameter instead of hard-coding GUEST Yep. Is there any reason we're not fixing that with this patch? ::: browser/components/loop/test/mochitest/browser_fxa_login.js @@ +7,5 @@ > > "use strict"; > > const gFxAOAuthTokenData = Cu.import("resource:///modules/loop/MozLoopService.jsm", {}).gFxAOAuthTokenData; > +const LOOP_SESSION_TYPE = Cu.import("resource:///modules/loop/MozLoopService.jsm", {}).LOOP_SESSION_TYPE; I might be confused, but if you have to pull in multiple symbols, I think you can do something like: const {gFxAOAuthTokenData, LOOP_SESSION_TYPE} = Cu.import("resource:///modules/loop/MozLoopService.jsm", {}); But since these contexts are cached, I don't think it makes a lot of difference.
Attachment #8486612 - Flags: review?(adam) → review+
(In reply to Adam Roach [:abr] from comment #1) > ::: browser/components/loop/MozLoopAPI.jsm > > + // XXX Should take a sessionType parameter instead of hard-coding GUEST > > Yep. Is there any reason we're not fixing that with this patch? It's not specific to the login flow (the three callers are related to calls) and the callers may need to make other changes which I'm not sure about. I'm filing those as part of my breakdown in bug 1061711. > ::: browser/components/loop/test/mochitest/browser_fxa_login.js > I might be confused, but if you have to pull in multiple symbols, I think > you can do something like: > > const {gFxAOAuthTokenData, LOOP_SESSION_TYPE} = > Cu.import("resource:///modules/loop/MozLoopService.jsm", {}); Good point about the object destructuring.
Blocks: 1065144
Depends on: 1065153
Depends on: 1065155
Blocks: 1065155
No longer depends on: 1065155
Blocks: 1065153
No longer depends on: 1065153
Comment on attachment 8486612 [details] [diff] [review] v.1 Second registration to the loop server Review of attachment 8486612 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/components/loop/MozLoopService.jsm @@ +263,4 @@ > /** > * Used to store a session token from a request if it exists in the headers. > * > + * @param {LOOP_SESSION_TYPE} sessionType All other function comments explain what sessionType is, except for this one. @@ -307,5 @@ > } > > // Authorization failed, invalid token, we need to try again with a new token. > - Services.prefs.clearUserPref("loop.hawk-session-token"); > - this.registerWithLoopServer(pushUrl, true); Good catch about the infinite retry loop here (unreferenced noRetry), as well as removing the negation from the boolean name.
Attachment #8486612 - Flags: review?(jaws) → review+
mikedeboer noticed I broke call URLs in the panel since I missed forwaring the sessionType from the public service method the internal. Apparently we don't have tests on TBPL for that: https://hg.mozilla.org/integration/fx-team/rev/e7bc94d454ee
(In reply to Matthew N. [:MattN] from comment #6) > mikedeboer noticed I broke call URLs in the panel since I missed forwaring > the sessionType from the public service method the internal. Apparently we > don't have tests on TBPL for that: Correct, we do have functional tests in work (bug 976134 I believe), but you can only run them manually at the moment (due to complexities of integration with build system).
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla35
Depends on: 1065777
Whiteboard: [loop-uplift]
Comment on attachment 8486612 [details] [diff] [review] v.1 Second registration to the loop server Approval Request Comment Uplift request for patches staged and tested on Fig
Attachment #8486612 - Flags: approval-mozilla-aurora?
Comment on attachment 8486612 [details] [diff] [review] v.1 Second registration to the loop server I worked with Randell and Maire on uplifting a large number of Loop bugs at once. All of the bugs have been staged on Fig and tested by QE before uplift to Aurora. As well, all of the bugs are isolated to the Loop client. Randell handled the uplift with my approval. I am adding approval to the bug after the fact for bookkeeping.
Attachment #8486612 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: