Display error message when Google sign-in fails during account registration #10436
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #10404
Updates code such that an error message is displayed whenever a Google sign-in attempt fails during account registration.
Technical
The client-side third-party authentication code handles errors by displaying an error message in a new div, which is attached to the DOM relative to an element with id
register
.openlibrary/openlibrary/plugins/openlibrary/js/ia_thirdparty_logins.js
Lines 31 to 37 in 45a0122
Potential Follow-up Items
It might be nice to use a single template for the login and sign-up pages. The existing templates for each are largely identical, and combining them would give us an opportunity to clean up some of the confusing class and id names. For example:
Class name on login page is
ol-page-signup
openlibrary/openlibrary/templates/login.html
Line 22 in 45a0122
ID on login form is
register
openlibrary/openlibrary/templates/login.html
Line 38 in 45a0122
Testing
Screenshot
Stakeholders