Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Web session" is displayed in Firefox iOS Account Management page #6407

Closed
SimonBasca opened this issue Apr 15, 2020 · 8 comments
Closed

"Web session" is displayed in Firefox iOS Account Management page #6407

SimonBasca opened this issue Apr 15, 2020 · 8 comments
Labels
Bug 🐞 This is a bug with existing functionality not behaving as expected

Comments

@SimonBasca
Copy link
Contributor

SimonBasca commented Apr 15, 2020

Steps to reproduce

  1. Log in to FxA
  2. Go to Account Management Page -> Devices & Apps

Expected behavior

  • The device ID should be displayed as it is on Firefox 24.1.

Actual behavior

  • "Web session" text is displayed

Device & build information

  • Device: iPhone Xr (13.3)
  • Build version: 25.0 (17678)

Notes

Attachments:

  • Firefox 24.1 screenshot
    Screen Shot 2020-04-15 at 4 59 08 PM

-Firefox 25.0(17678)
Screen Shot 2020-04-15 at 4 59 40 PM

┆Issue is synchronized with this Jira Task

@SimonBasca SimonBasca added the Bug 🐞 This is a bug with existing functionality not behaving as expected label Apr 15, 2020
@project-bot project-bot bot added this to Needs Triage in Firefox iOS Development Apr 15, 2020
@garvankeeley
Copy link
Contributor

@vladikoff any idea how we can filter this?

@ryanfeeley
Copy link

I think this is related to the technical implementation, but whatever backflips are required to make this look like Firefox for iOS (icon, text, etc), should certainly happen.

@vladikoff
Copy link
Contributor

@vladikoff any idea how we can filter this?

Hm we need to make sure that the message here opens with the correct token:

sessionToken: "\(token)",

This is what should make the
appear as the current device

@athomasmoz
Copy link

@vladikoff Is this something to be fixed on the FxA side or something else you need from us?

@vladikoff
Copy link
Contributor

vladikoff commented Apr 24, 2020 via email

@vladikoff
Copy link
Contributor

Still looking at this...

@vladikoff
Copy link
Contributor

To fix the issue with the "Current Device" we need to switch to using the uid instead of the email as follows:

diff --git a/RustFxA/FxAWebView.swift b/RustFxA/FxAWebView.swift
index 200d6f397..ed43769c2 100755
--- a/RustFxA/FxAWebView.swift
+++ b/RustFxA/FxAWebView.swift
@@ -189,12 +189,14 @@ extension FxAWebView: WKScriptMessageHandler {
         let data: String
         if pageType == .settingsPage {
             let fxa = RustFirefoxAccounts.shared.accountManager
-            let email = fxa.accountProfile()?.email ?? ""
+            let uid = fxa.accountProfile()?.uid ?? ""
             let token = (try? fxa.getSessionToken().get()) ?? ""
             data = """
-            {   signedInUser: {
+            {
+                capabilities: {},
+                signedInUser: {
                     sessionToken: "\(token)",
-                    email: "\(email)",
+                    uid: "\(uid)",
                     verified: true,
                 }
             }

Even with this change we will see Web Sessions in the list, I'll follow up on a way to deal with that in a bit...

@data-sync-user data-sync-user changed the title "Web session" is displayed in Firefox iOS Account Management page FXIOS-346 ⁃ "Web session" is displayed in Firefox iOS Account Management page Oct 17, 2020
@dnarcese dnarcese closed this as completed Nov 1, 2021
@vladikoff
Copy link
Contributor

👍

@data-sync-user data-sync-user changed the title FXIOS-346 ⁃ "Web session" is displayed in Firefox iOS Account Management page "Web session" is displayed in Firefox iOS Account Management page Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 This is a bug with existing functionality not behaving as expected
Projects
None yet
Development

No branches or pull requests

6 participants