Skip to content

Prevent double clicking of the submit button on login#3554

Merged
nabokihms merged 2 commits into
dexidp:masterfrom
pcorliss:UPPI-2578/pkc-prevent-double-clicking
Jun 13, 2024
Merged

Prevent double clicking of the submit button on login#3554
nabokihms merged 2 commits into
dexidp:masterfrom
pcorliss:UPPI-2578/pkc-prevent-double-clicking

Conversation

@pcorliss
Copy link
Copy Markdown
Contributor

Overview

Disables the submit button on login to prevent clicking multiple times while waiting for a response from the form submission on login.

What this PR does / why we need it

When connecting to a very slow provider a response can take several seconds, without a visual indicator users click the submit button several times. After multiple clicks when a response is returned it's often a 500 error page within our setup. Better to prevent the user from submitting the form multiple times and indicating that by disabling the button.

We can solve this issue internally by having a custom frontend documented here https://dexidp.io/docs/guides/templates/ but this felt like a good thing to share more widely to help others.

Special notes for your reviewer

If necessary the following can be rewritten inline to avoid loading a unique JS file.

@nabokihms nabokihms self-requested a review May 30, 2024 13:50
Copy link
Copy Markdown
Member

@nabokihms nabokihms left a comment

Choose a reason for hiding this comment

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

Overall the idea looks cool. Just a couple of questions.

Comment thread web/static/form.js Outdated
Comment thread web/static/form.js Outdated
pcorliss added 2 commits June 6, 2024 09:17
Signed-off-by: Philip Corliss <pcorliss@drwholdings.com>
Signed-off-by: Philip Corliss <pcorliss@drwholdings.com>
@pcorliss pcorliss force-pushed the UPPI-2578/pkc-prevent-double-clicking branch from e900918 to 8ca20f2 Compare June 6, 2024 14:18
@pcorliss pcorliss requested a review from nabokihms June 11, 2024 18:30
@nabokihms nabokihms merged commit a174846 into dexidp:master Jun 13, 2024
@nabokihms nabokihms added this to the v2.41.0 milestone Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants