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

404 during UI authentication with matrix-synapse-shared-secret-auth #12282

Open
matrixbot opened this issue Dec 19, 2023 · 0 comments
Open

404 during UI authentication with matrix-synapse-shared-secret-auth #12282

matrixbot opened this issue Dec 19, 2023 · 0 comments

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 19, 2023

This issue has been migrated from #12282.


element-hq/element-web#20292 (comment) describes a custom user-interactive auth flow which a client did not understand. The client tried to request a HTML fallback to show to its user. The response from synapse was an error:

Start authentication link https://my_homeserver/_matrix/client/r0/auth/com.devture.shared_secret_auth/fallback/web?session=TpDJpMZAnnTXJHRGDQuQPlvs returns {"errcode":"M_UNKNOWN","error":"Unknown auth stage type"}

Judging by Synapse's source code, this probably came with a 404 status code. However, the spec says:

If a client does not know how to handle a given login type, it can direct the user to a web browser with the URL of a fallback page which will allow the user to complete that login step out-of-band in their web browser. The URL it should open is:

/_matrix/client/v3/auth/<auth type>/fallback/web?session=<session ID>

Where auth type is the type name of the stage it is attempting and session ID is the ID of the session given by the homeserver.

This MUST return an HTML page which can perform this authentication stage.

The JSON blob returned does not constitute an HTML page, so we are not spec compliant.

The report in that issue claimed to be running on Synapse 1.49 and using an unspecified version of devture/matrix-synapse-shared-secret-auth.

Original Description

Flows provided by _get_available_ui_auth_types are unordered, it causes element-hq/element-web#19605 and devture/matrix-synapse-shared-secret-auth#12.

@matrixbot matrixbot changed the title Dummy issue 404 during UI authentication with matrix-synapse-shared-secret-auth Dec 21, 2023
@matrixbot matrixbot reopened this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant