element-hq / element-hq/element-web

SSO login should use state parameter

Open
#27,217 1 comment 0 reactions 0 assignees View on GitHub
A-Login O-Frequent S-Minor T-Enhancement Z-Fixed-By-OIDC
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Your use case

#### What would you like to do?

The spec [recommends](https://spec.matrix.org/v1.9/client-server-api/#security-considerations-14) clients to use a unique identifier in the SSO redirect URL to guard against unsolicited login attempts. Element Web doesn't appear to do this at the moment:

https://matrix-client.matrix.org/_matrix/client/v3/login/sso/redirect/oidc-github?redirectUrl=https%3A%2F%2Fapp.element.io%2F&org.matrix.msc3824.action=login

#### Why would you like to do it?

For added security.

#### How would you like to achieve it?

Maybe dice a state, put it into `localStorage` and verify it upon redirection?

### Have you considered any alternatives?

_No response_

### Additional context

_No response_

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.