element-hq / element-hq/element-web

The linux tarballs don't provide a way to register the OIDC callback protocol scheme, breaking login.

Open
#33,359 2 comments 0 reactions 0 assignees View on GitHub
A-Electron A-OIDC A-Packaging O-Occasional S-Major T-Defect Z-Upstream
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

1. Install element-desktop from https://packages.element.io/desktop/install/linux/ as linked from https://element.io/download
2. Try to log in via MAS
3. MAS opens in the browser; you give it your credentials.
4. First time nothing happens. Next time, you get "Authorization grant [ID] already used"

### Outcome

#### What did you expect?

The browser should redirect back to element-desktop once you're logged in.

#### What happened instead?

The redirect doesn't happen, and if you retry you get a "Authorization grant [ID] already used"

The problem looks to be that we don't include an XDG .desktop file in the tarball, unlike the deb package which comes with:

```
% cat usr/share/applications/element-desktop.desktop
[Desktop Entry]
Name=Element
Exec=/opt/Element/element-desktop %U
Terminal=false
Type=Application
Icon=element-desktop
StartupWMClass=Element
Comment=Element: the future of secure communication
MimeType=x-scheme-handler/io.element.desktop;x-scheme-handler/element;
Categories=Network;InstantMessaging;Chat;
```

to provide the URI association.

Possible solutions:
* Include a .desktop file in the tarball with instructions on what to do with it
* Include instructions on how to set up xdg-mime or similar to manually add the URI scheme association
* Have MAS provide a token which can be copy-pasted back to the app for situations where the URI redirect back to the app doesn't work.

See also https://github.com/element-hq/element-web/issues/32043#issuecomment-3870894182

See https://bsky.app/profile/warpfork.bsky.social/post/3mkugxy52h22w for original bug & context

### Operating system

Arch

### Application version

1.12.17

### How did you install the app?

tarball

### Homeserver

matrix.org

### Will you send logs?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.