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

[2.x] Require an actual login #121

Merged
merged 1 commit into from
Nov 6, 2024
Merged

[2.x] Require an actual login #121

merged 1 commit into from
Nov 6, 2024

Conversation

Jade-GG
Copy link
Collaborator

@Jade-GG Jade-GG commented Oct 24, 2024

@Jade-GG Jade-GG requested a review from royduin November 4, 2024 08:28
jordythevulder
jordythevulder previously approved these changes Nov 5, 2024
@royduin
Copy link
Member

royduin commented Nov 5, 2024

Is this for v2 or v3?

@Jade-GG
Copy link
Collaborator Author

Jade-GG commented Nov 5, 2024

Is this for v2 or v3?

This was for v2, I'll update the branch and check if v3 also needs it in a moment :)

@Jade-GG Jade-GG changed the base branch from master to 2.x November 5, 2024 09:22
@Jade-GG Jade-GG dismissed stale reviews from jordythevulder and Roene-JustBetter November 5, 2024 09:22

The base branch was changed.

@Jade-GG Jade-GG changed the title Require an actual login [2.x] Require an actual login Nov 5, 2024
@Jade-GG
Copy link
Collaborator Author

Jade-GG commented Nov 5, 2024

v3: #134

@royduin
Copy link
Member

royduin commented Nov 5, 2024

Any info?

@Jade-GG
Copy link
Collaborator Author

Jade-GG commented Nov 6, 2024

Any info?

Copied from the PR mentioned at the start:

"Previously, you could just type in any random password in the password box and it would validate without the need to log in, allowing people to actually try placing an order on an existing account without logging in. This fixes that bug."

@royduin
Copy link
Member

royduin commented Nov 6, 2024

And why do we need a checkbox for that? How does it work and look?

@Jade-GG
Copy link
Collaborator Author

Jade-GG commented Nov 6, 2024

And why do we need a checkbox for that? How does it work and look?

Right, I'll elaborate on that:

As long as the password field is visible, the form should never validate (note, in v3 this can mean you're creating an account so there's a v-if on it to check that there). We can't (really) do this with just the textbox itself, we can only make the textbox required which isn't enough.

So, the simplest solution is that we can add an invisible checkbox that can never be checked, give it a custom validation message, and then give it the bounding box of the password field so that the validation message looks like it's just coming from the password field.

@royduin
Copy link
Member

royduin commented Nov 6, 2024

Ah nice! Thanks for the info 🚀

@royduin royduin merged commit a12ae92 into 2.x Nov 6, 2024
@royduin royduin deleted the feature/log-in-required branch November 6, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants