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

Crash when trying to login to homeserver that does not return identity_providers field of m.login.sso flow schema #1369

Closed
hughns opened this issue Aug 1, 2023 · 0 comments
Labels
area: auth priority: critical Needs a fix ASAP type: bug Something isn't working

Comments

@hughns
Copy link

hughns commented Aug 1, 2023

Describe the bug

Cinny is unable to sign in to a Matrix homeserver that offers the m.login.sso login type but where the homeserver does not provide a list of identity providers.

Instead the user ends up stuck on a blank screen.

Reproduction

  1. Go to https://app.cinny.in/
  2. Enter homeserver synapse-oidc.lab.element.dev into the input field
  3. You end up on a blank screen
  4. Check the Javascript console and see the following error:
index-cb0350e9.js:7 TypeError: Cannot read properties of undefined (reading 'sort')
    at hN (index-cb0350e9.js:57022:31396)
    at wy (index-cb0350e9.js:5:52909)
    at Cq (index-cb0350e9.js:9:8732)
    at Aq (index-cb0350e9.js:9:948)
    at Kv (index-cb0350e9.js:9:876)
    at mn (index-cb0350e9.js:9:729)
    at Pk (index-cb0350e9.js:7:10826)
    at index-cb0350e9.js:5:38721
    at g.unstable_runWithPriority (index-cb0350e9.js:1:13085)
    at XE (index-cb0350e9.js:5:38499)

Expected behavior

In the case that the homeserver does not specify a list of identity providers it should show a single SSO login button labelled something similar to "Continue with SSO".

Platform and versions

1. OS: macOS
2. Browser: Chrome 115.0.5790.114
3. App: 2.2.6 (app.cinny.in)
4. Homeserver: `synapse-oidc.lab.element.dev`

Additional context

The response to GET https://synapse-oidc.lab.element.dev/_matrix/client/v3/login is:

{
    "flows": [
        {
            "type": "m.login.password"
        },
        {
            "type": "m.login.sso",
            "org.matrix.msc3824.delegated_oidc_compatibility": true
        },
        {
            "type": "m.login.token"
        }
    ]
}

Which is valid as per the m.login.sso flow schema section of https://spec.matrix.org/v1.7/client-server-api/#client-login-via-sso because the identity_providers field is optional:

Optional identity providers (IdPs) to present to the user. These would appear (typically) as distinct buttons for the user to interact with, and would map to the appropriate IdP-dependent redirect endpoint for that IdP.

@ajbura ajbura added type: bug Something isn't working priority: critical Needs a fix ASAP area: auth labels Aug 1, 2023
@ajbura ajbura mentioned this issue Jan 21, 2024
9 tasks
@kfiven kfiven moved this to ⚒️ PWA and URL navigation in Public roadmap Mar 30, 2024
@kfiven kfiven closed this as completed Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: auth priority: critical Needs a fix ASAP type: bug Something isn't working
Projects
Status: ✅ URL navigation and New UI
Development

No branches or pull requests

3 participants