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

[Bug]: Linkedin loaded in WebView prompting Windows users to "Sign in with your passkey" #41472

Closed
3 tasks done
joelwright-dev opened this issue Feb 29, 2024 · 15 comments
Closed
3 tasks done
Labels

Comments

@joelwright-dev
Copy link

Preflight Checklist

Electron Version

28.2.0

What operating system are you using?

Windows

Operating System Version

Windows 11 Version 22H2

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

The user can sign in using their username and password.

Actual Behavior

The user attempts to sign in, the Windows Security "Sign in with your passkey" popup appears, the user clicks Cancel, the cycle repeats.

Screenshot 2024-02-29 112116

Testcase Gist URL

No response

Additional Information

Linkedin is the only site this behavior can be observed on. The URL is being loaded through a webview. The following electron settings are in use:

const mainWindow = new BrowserWindow({
    icon: __dirname + "/images/favicon.icns",
    webPreferences: {
      webviewTag: true,
      preload: path.join(app.getAppPath(), 'src/scripts/nest.js'),
      nativeWindowOpen: false,
      contextIsolation: true,
      sandbox: false
    },
    maximizable: false,
    frame: false,
    backgroundColor: "#FFF"
  });
@slavochek2
Copy link

yes, would love to see it fixed :)

@elarrat
Copy link

elarrat commented Feb 29, 2024

Same as this one I've created this a few months ago: #40812

@VerteDinde
Copy link
Member

Thanks for reaching out! Because we treat our issues list as the team's backlog, we close issues that are questions since they don't represent a task needing to be completed. In this specific case, because the issue is specific to LinkedIn's auth page, it's likely either a bug or intended feature of their login flow.

This forum is for raising bugs or requesting new features, and for most questions about Electron there are a lot of more appropriate community options. There are helpful people in this Discord or the subreddit that should be willing to point you in the right direction.

@VerteDinde VerteDinde closed this as not planned Won't fix, can't repro, duplicate, stale Mar 2, 2024
@joelwright-dev
Copy link
Author

Is there potential for a feature to be added which can disable these types of popups?

@joelwright-dev
Copy link
Author

Additionally, this doesn't happen in the chrome browser, this isn't expected functionality from loading this website in the webview, and as such would consider that as a bug.

@slavochek2
Copy link

slavochek2 commented Mar 3, 2024 via email

@joelwright-dev
Copy link
Author

I agree, this might seem like a specific case that isn't too important to fix but this could cause future issues in applications as this is not expected behavior. I've seen bugs like this reported before and be closed because "its a question". These aren't questions, these are unexpected behaviors we're experiencing, and as far us we can tell, don't have any way of even debugging or implementing a work around.

@slavochek2
Copy link

@VerteDinde what can we do to appeal and reopen this ticket please? :)

@joelwright-dev
Copy link
Author

I've also created a post on reddit if you'd like to keep up to date with the thread: https://www.reddit.com/r/electronjs/comments/1b4ke3g/linkedin_authentication_issues_passkey_popup/

@doug-cb
Copy link

doug-cb commented Mar 4, 2024

I'm also seeing this issue with LinkedIn. It only occurs with Electron, not with Edge or Chrome

@joelwright-dev
Copy link
Author

I have an update! After playing around with the requests being sent by Linkedin and blocking certain ones until I got somewhere, I managed to come up with this work around code. Ideally the electron team still implements a way to block this passkey request, however for those in need of a solution for the particular case of Linkedin, let me know if this works:

// when a webview is created, add the following code to it
app.on("web-contents-created", (e, wc) => {
  // before a webview makes a request
  wc.session.webRequest.onBeforeRequest((details, callback) => {
    // if the request url matches the url which appears to be sending the passkey request
    if(details.url.includes("checkpoint/pk/initiateLogin")) {
      // log the blocked url
      console.log("\x1b[31m", "Blocked", details.url)
    } else {
      // if the request url doesn't match the misbehaving url, allow the callback as usual
      callback({})
    }
  })
})

@slavochek2
Copy link

@joelwright-dev thanks! we will try this and I will write back if it works :)

@slavochek2
Copy link

@joelwright-dev You are awesome!! Thank you for sharing! This worked :)

@joelwright-dev
Copy link
Author

@slavochek2 glad I could come up with the work around 😄 hopefully the team implements something for disabling this properly in a future update

@Polyline78
Copy link

Works great Joel, thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants