Closed Bug 1376007 Opened 7 years ago Closed 7 years ago

Receive and handle FxAccount push notification – account verified

Categories

(Firefox for iOS :: Firefox Accounts, enhancement, P1)

Other
iOS
enhancement

Tracking

()

RESOLVED FIXED
Iteration:
1.29
Tracking Status
fxios 10.0 ---

People

(Reporter: jhugman, Assigned: jhugman)

References

Details

(Whiteboard: [MobileCore][Autopush])

Attachments

(1 file)

There doesn't seem to be any specific message for account verified.

https://dxr.mozilla.org/mozilla-central/source/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/FxAccountPushHandler.java#38 allows for an empty payload.

Bug 1274150 on the server, may also be related.
Blocks: 1344708
Blocks: 1373208
Whiteboard: [MobileCore][AutoPush]
Assignee: nobody → jhugman
Iteration: --- → 1.25
Priority: -- → P1
Iteration: 1.25 → 1.26
Iteration: 1.26 → 1.27
Iteration: 1.27 → 1.28
This is blocked on being FxA not being able to send an accountVerified message to the device. 

Once we see that, then we can perhaps duplicate it with fxa.core.Client.
Flags: needinfo?(vbudhram)
Iteration: 1.28 → 1.29
Last week worked with James and this is what we found/updated:

 * Deployed a new version of http://ios-push2.dev.lcip.org, that always sends an `accountVerify` message.
 * Changed `case accountVerified = "accountVerify"`, line 224 in FxAPushMessageHandler

Tested with an updated PyFxA script to simulate sending the message

```
from getpass import getpass
from fxa.core import Client

c = Client("https://ios-push2.dev.lcip.org/auth/v1")
s = c.login(email, password)

try:
    s.apiclient.post("/account/devices/notify", json={
      "to": "all",
      "endpointAction": "accountVerify",
      "payload": {}
    }, auth=s._auth)
finally:
    s.destroy_session()
```

I noticed that if the account is unverified, the push messaged received is nil. Manually verifying the account and re-running script correctly shows an `accountVerify` push message. Is it possible that there is something in the iOS client that doesn't correctly register push messaging until after an account has been confirmed?
Flags: needinfo?(vbudhram)
(In reply to Vijay Budhram from comment #3)
> I noticed that if the account is unverified, the push messaged received is
> nil. Manually verifying the account and re-running script correctly shows an
> `accountVerify` push message. Is it possible that there is something in the
> iOS client that doesn't correctly register push messaging until after an
> account has been confirmed?
This may be the same bug as Bug 1382561. Will add that comment there.
Comment on attachment 8896500 [details] [review]
Link to Github pull-request: https://github.com/mozilla-mobile/firefox-ios/pull/3037

This patch has got really small now!
Attachment #8896500 - Flags: review?(jdarcangelo)
Status: NEW → ASSIGNED
Attachment #8896500 - Flags: review?(jdarcangelo) → review+
Merged into master.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [MobileCore][AutoPush] → [MobileCore][Autopush][needsuplift]
Uplift when https://github.com/mozilla/fxa-auth-server/pull/2108 has been resolved.
Whiteboard: [MobileCore][Autopush][needsuplift] → [MobileCore][Autopush]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: