Receive and handle FxAccount push notification – account verified

RESOLVED FIXED

Status

()

P1
normal
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: jhugman, Assigned: jhugman)

Tracking

unspecified
Other
iOS
Dependency tree / graph

Firefox Tracking Flags

(fxios10.0)

Details

(Whiteboard: [MobileCore][Autopush])

Attachments

(1 attachment)

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.
(Assignee)

Updated

2 years ago
Blocks: 1344708
(Assignee)

Updated

2 years ago
Blocks: 1373208
Whiteboard: [MobileCore][AutoPush]
(Assignee)

Updated

a year ago
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
tracking-fxios: --- → 9.0

Comment 3

a year ago
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)
(Assignee)

Updated

a year ago
Status: NEW → ASSIGNED
Attachment #8896500 - Flags: review?(jdarcangelo) → review+
Merged into master.
(Assignee)

Updated

a year ago
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Whiteboard: [MobileCore][AutoPush] → [MobileCore][Autopush][needsuplift]
tracking-fxios: 9.0 → 10.0
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.