Skip to content

UX: better error message when social login fails #32772

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

Merged
merged 3 commits into from
May 20, 2025

Conversation

ZogStriP
Copy link
Member

This improves the error message(s) displayed when an error happens while using a social login to log in / sign up into a Discourse community.

Unfortunately, we can't be super precise in the reason behind the error (it can be the user clicked "cancel" during the authorization phase, or any of the plethora of other possible errors) because the reason isn't provided (either for security reasons, or because it's just hard to do so in a reliable & consistent way accross all social logins).

The best I could do was to

  • add the name of the "social login" provider in the error message
  • tweak the copy a bit for the different cases handle
  • fix the CSS/HTML to match the one used by the main application

In order to show the name of the provider, we use either the "provider" or the "strategy" query parameter, or use the name of the authenticator (if it's the only one enabled).

Internal ref - t/153662


BEFORE

before

AFTER

after

@github-actions github-actions bot added the i18n PRs which update English locale files or i18n related code label May 16, 2025
ZogStriP added 2 commits May 20, 2025 13:10
This improves the error message(s) displayed when an error happens while
using a social login to log in / sign up into a Discourse community.

Unfortunately, we can't be super precise in the reason behind the error
(it can be the user clicked "cancel" during the authorization phase, or
any of the plethora of other possible errors) because the reason isn't
provided (either for security reasons, or because it's just hard to do
so in a reliable & consistent way accross all social logins).

The best I could do was to

- add the name of the "social login" provider in the error message
- tweak the copy a bit for the different cases handle
- fix the CSS/HTML to match the one used by the main application

In order to show the name of the provider, we use either the "provider"
or the "strategy" query parameter, or use the name of the authenticator
(if it's the only one enabled).

Internal ref - t/153662
@ZogStriP ZogStriP force-pushed the better-error-message-when-social-login-fails branch from 208dffc to 098e6a3 Compare May 20, 2025 11:12
@ZogStriP ZogStriP merged commit 0de08e7 into main May 20, 2025
16 checks passed
@ZogStriP ZogStriP deleted the better-error-message-when-social-login-fails branch May 20, 2025 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n PRs which update English locale files or i18n related code
Development

Successfully merging this pull request may close these issues.

2 participants