question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

An Extension API to initiate an OAuth2 authentication process using a "popup" browser window instead of opening a new tab for the same

See original GitHub issue

I am creating a Vs Code web extension with OAuth2 based authentication (similar to Github Authentication in VS Code). I’m using vscode.env.openExternal to initiate the login process, which opens a new tab. Is there another option to open the same process in a popup window using VS Code’s Extension API? Github Authentication uses a popup window for the same. I wasn’t able to find the particular VS Code’s Extension API.

Requests

  1. Provide an Extension API for opening OAuth2 links in a popup window instead of opening a new tab, so the user doesn’t have to leave the vscode.dev’s browser tab while trying to authenticate. The whole authentication, redirection, and URL capture by vscode’s URI handler should happen without switching to another tab.

What seems to be the issue?

  • I’m using vscode.env.openExternal to initiate the login process, which opens a new tab. This forces the user to leave the current vscode.dev’s context and hence ruining the user experience. On the other hand, the Popup window for OAuth2 is a very popular pattern for authentication, which most of the users are already familiar with, so that pattern would make things easier for the users.

Version: 1.63.2 Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3 User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36 Embedder: vscode.dev

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:27
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
TylerLeonhardtcommented, Feb 3, 2022

@jrieken I would love this. Currently this works on vscode.dev because we specify a few specific Uris in the embedder that should open in a pop up but it would be nice to have a general solution for this that works for Desktop as well.

1reaction
TylerLeonhardtcommented, Dec 8, 2022

@joaomoreno that pop up that we have only shows for “trusted” sites. I’m wondering if there’s a way to have the pop up but make it still “not trusted” just as tabs that are opened in new tabs are opened today?

One problem I foresee is that the site needs to be “trusted” for us to auto-close the pop up so the best we could do here is that the popup stays around and you have to close it manually.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OAuth 2.0 for Client-side Web Applications | Authorization
You can open the URL in the current browser window or a popup. The user can authenticate with Google and grant the requested...
Read more >
Facebook OAuth2 dialog opening in a new tab instead of ...
I've noticed that on a bunch of websites, when a user is prompted to connect with facebook, everything is happens on a new...
Read more >
chrome.browserAction - Chrome Developers
chrome.browserAction · Description. Use browser actions to put icons in the main Google Chrome toolbar, to the right of the address bar. In...
Read more >
Configure third party OAuth IdP authentication - Microsoft Learn
OAuth 2.0 is an open standard for authentication used by Azure AD and many other service providers. Understanding OAuth 2.0 is a ...
Read more >
Authentication API Explorer - Auth0
The Authentication API enables you to manage all aspects of user identity when you use Auth0. It offers endpoints so your users can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found