Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Ignore unrecognised login flows #1633

Merged
merged 1 commit into from
Nov 27, 2017

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Nov 27, 2017

Update the Login component so that if it sees an unrecognised login flow, it just ignores it and uses another one, so that riot can still be used with homeservers supporting custom login types.

NB this PR is against master release-v0.11-patches

Update the Login component so that if it sees an unrecognised login flow, it
just ignores it and uses another one, so that riot can still be used with
homeservers supporting custom login types.
@dbkr
Copy link
Member

dbkr commented Nov 27, 2017

lgtm, but pr should probably be against the release branch so master always matches what's released?

@@ -862,7 +862,7 @@
"Error: Problem communicating with the given homeserver.": "Error: Problem communicating with the given homeserver.",
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.": "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.",
"Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.": "Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.",
"Sorry, this homeserver is using a login which is not recognised ": "Sorry, this homeserver is using a login which is not recognised ",
"This homeserver doesn't offer any login flows which are supported by this client.": "This homeserver doesn't offer any login flows which are supported by this client.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this include some information about what a user should do in order to solve the problem? E.g. "Please make sure you are running the latest version of Riot, and check the website of the homeserver to see if they recommend using a specific client."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're assuming that the homeserver has a website?

Copy link
Contributor

@pafcu pafcu Nov 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally a homeserver could provide the client with things like links to privacy policy, support page, etc. but barring that, it seems like there is at least no harm in suggesting looking for a page that may or may not exist. A user that connects to a homeserver not ran by an organization of some sort (who usually have websites) probably has the skill level to avoid the advice. A non-expert user on the other hand has no idea what to do if they get an error like that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO we're really just saying "this client doesn't support this homeserver", but trying to give the expert user a bit more information on why not.

Riot is first and foremost a hosted webapp, so "Please make sure you are running the latest version of Riot" is nonsensical for the average user. Plus this is react-sdk, not Riot, so we can't necessarily assume the user is using Riot.

In general a user will have had to register with a homeserver to get this far, which suggests that they have, in the past, used a client which supports whatever weird login flow the server wants, so they can't be completely clueless.

Copy link
Contributor

@pafcu pafcu Nov 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Except the server might have changed their login flow, which means the client they have been using successfully previously no longer works.

Perhaps the reason for the error is more likely then that there is a problem with the server? In which case we should inform the user that they might want to contact support or try again later.

@richvdh richvdh changed the base branch from master to release-v0.11-patches November 27, 2017 17:50
@richvdh richvdh merged commit 4a20185 into release-v0.11-patches Nov 27, 2017
@richvdh richvdh deleted the rav/handle_login_flows_better branch November 30, 2022 10:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants