Redirect after browser authentication does not open application
See original GitHub issueDescribe the bug
Authentication using the browser does not return to the application because it uses an unregistered mime-type scheme by the application.
Version & OS
- Source: GitHubDesktop-linux-2.5.3-linux1.deb
- Version: 2.1.0-linux1
- OS: Linux Mint 20 Cinnamon | Cinnamon v4.6.6 | Linux Kernel 5.4.0-42-generic | 64bits
- Processor: AMD A10-7860K Radeon R7, 12 Compute Cores 4C+8G × 2
- Tested Browsers: Chrome 84.0.4147.105 | Firefox 79.0
Steps to reproduce the behavior
- Download package from GitHubDesktop-linux-2.5.3-linux1.deb and install
- Open application and go to: “Sign in to GitHub.com” (button) or File > Options > Accounts and sign in “GitHub.com” with “Sign in using your browser”
- Sign in to GitHub.com if you have not done so before … authorize the application and confirm using username/email and password or use the security key
Expected behavior
In https://github.com/login/oauth/authorize is expected to redirect to the application through its own protocol (x-github-desktop-dev-auth) that the application must recognize.
Actual behavior
The redirect does not occur after confirming the “xdg-open” prompt … the application does not recognize the schema.
x-github-desktop-dev-auth://oauth?code=xxxxxxxxxxxxxxxxxxxxx&state=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
Screenshots
Additional context
This behavior has been observed in new installations on both Linux Mint 19.3 and 20.
When viewing the application’s “github-desktop.desktop” file, the protocol used in the browser was missing from the MimeTypes list of the file.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
How to redirect to a login page, but only when the browser is ...
It feels like the Accept header should be my guide in this, but I need this to work even if the user has...
Read more >[Question] Redirect from browser after web auth doesn't happen
Steps to reproduce: Call auth.webAuth.authorize() . Browser with a hosted login page opens. Perform authentication. Expected behavior:
Read more >When logging into desktop app, doesn't redirect back to app ...
When logging in to the the Asana app it directs us to the browser to login using SSO. However, we are not being...
Read more >738724 - Chrome tabs not redirecting back to app without user ...
External auth app does its thing and redirects back to the open page with the "redirect back url" which makes the browser "resume...
Read more >Redirect Users - Auth0
Describes how to redirect users to URLs that have not been added to the AllowList. ... your application after validating their ID Tokens...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Palliative editing of the
github-desktop.desktop
file and adding the schema mime-type used in the redirect and updating the mime-type database solves the problem and in future attempts, the redirection returns to the application.Steps:
1- Open
/usr/share/applications/github-desktop.desktop
with the text editor of your choice2 - Add the scheme (“x-scheme-handler/x-github-desktop-dev-auth;”) in the “MimeType” list and save
3 - Update mime types database
4 - Redo the authentication by the browser … now the redirect should open the application completing the authorization
Note: after performing steps 1 to 3, it is no longer possible to reproduce the problem even if you uninstall and reinstall the package.
I’m going to close this out as I think I’ve configured everything right in the Debian installer as of version
2.4.1-linux2