Closed Bug 805648 Opened 12 years ago Closed 12 years ago

onlogout / onlogin not called from watch() in trusty UI

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

x86
macOS
defect
Not set
normal

Tracking

(blocking-basecamp:+)

RESOLVED FIXED
blocking-basecamp +

People

(Reporter: kumar, Unassigned)

References

Details

Attachments

(1 file)

Attached file b2g log (deleted) —
I ran into an issue when integrating id.watch() on b2g for nav.mozPay() (bug 804848).

It seems that onlogout should be called but it's not. From the logs, doReady is called but not doLogout.

This is using the dev version of identity: https://gist.github.com/3778932

First, the marketplace app calls id.watch() and that works. Next it loads webpay in the trusty UI using nav.mozPay(). That calls id.watch() again and that's where I'm stuck. It never calls any callbacks. A log is attached.
Blocks: 804848
Are there any workarounds?
Noming anyways just in case.
blocking-basecamp: --- → ?
Jason: this is definitely blocking-basecamp, it's a bug in the integration of payments and identity, without which you can't do in-app payment.
(In reply to Ben Adida [:benadida] from comment #3)
> Jason: this is definitely blocking-basecamp, it's a bug in the integration
> of payments and identity, without which you can't do in-app payment.

Ah okay, makes sense. Feel free to set the flag then to +.
blocking-basecamp: ? → +
I'm not sure exactly what is triggering this behavior but if you want to try calling navigator.id.watch() from within navigator.mozPay() here's how to set that up:

1) make a web page that calls navigator.mozPay([jwt]) from b2g. It doesn't have to be an app.
2) edit your dom prefs to whitelist a pay server like https://github.com/mozilla/webpay#setting-up-your-b2g-device
3) The pay server can be any web server but make sure it is reachable via https
4) have that pay server try to call navigator.id.watch()

The JWT you pass to the JS call needs to be well formed but it can be an expired JWT too. You could grab the test JWT from this: https://github.com/mozilla-b2g/gaia/blob/master/test_apps/uitest/tests/pay.html
Hooray! jed fixed this. I think he still needs an r? on the patch so I'll let him closed. The target moved to bug 807122
No longer depends on: 807078, 807122
Thanks, Kumar.  Glad this is working.  For those reading along, the relevant patches for this bug are:

Bug 807078
Bug 807122

Once they're landed, I'll go ahead and close this.
Whiteboard: feature-complete
Whiteboard: feature-complete → [feature-complete]
Caitlin: this is a bug with the way the trusty UI works, so I don't think the label feature-complete makes sense.
How are we doing here?
(In reply to Andreas Gal :gal from comment #9)
> How are we doing here?

This work is now happening in bug 807122, as per Kumar's comment. That work is almost done, pending a Gaia PR.

Kumar: can you confirm that bug 807122 will handle what you need?
Blocks: basecamp-id
Yep, all good on the marketplace app. I tested using today's nightly B2G desktop and gaia master. With the correct custom settings I could use Persona in the purchase window. bug 807122 is completely fixed for me.
(In reply to Kumar McMillan [:kumar] from comment #11)
> Yep, all good on the marketplace app. I tested using today's nightly B2G
> desktop and gaia master. With the correct custom settings I could use
> Persona in the purchase window. bug 807122 is completely fixed for me.

Thanks for the report, Kumar!  I've gone ahead and marked Bug 807122 as resolved, and I will now close this bug as well.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Keywords: verifyme
QA Contact: jsmith
Whiteboard: [feature-complete]
Component: Identity → Gaia::System
Product: Core → Boot2Gecko
Version: Other Branch → unspecified
Keywords: verifyme
QA Contact: jsmith
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: