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

HCB Application Form: Deter use of shared email addresses #1079

Open
garyhtou opened this issue Feb 20, 2024 · 7 comments
Open

HCB Application Form: Deter use of shared email addresses #1079

garyhtou opened this issue Feb 20, 2024 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@garyhtou
Copy link
Member

We already deter users from inviting shared email addresses on HCB.
image

We should do the same with the application form. This is because emails collected via the form are automatically invited to HCB.
image

@Chay2203
Copy link
Contributor

Chay2203 commented Mar 7, 2024

Hey! I would love to work on this issue too @garyhtou.

@garyhtou
Copy link
Member Author

Go for it! Here is the updated copy that we use on HCB

⚠️ For security, we discourage team emails on HCB. We recommend individual emails such as ben@hackclub.com!

@Chay2203
Copy link
Contributor

Hey @garyhtou, can you comment on the links of the above page where the warning must be added and the source page where it is already being implemented?

@garyhtou
Copy link
Member Author

Hi @Chay2203!

Warning should be implemented here

<Field name="userEmail" label="Email" requiredFields={requiredFields}>
<Input
name="userEmail"
id="userEmail"
type="email"
placeholder="fiona@hackclub.com"
/>
</Field>

The existing implementation is unfortunately in a closed source codebase.

@Chay2203
Copy link
Contributor

Sure, works!

@garyhtou
Copy link
Member Author

Here's the closed-source implementation. You can use it as a guide, however, the implementation we want here will likely be different.

  <div x-data="{ email: '' }">
    <div class="field flex items-end">
      <div class="mr2 flex-auto">
        <%= form.label :email %>
        <%= form.email_field :email, "x-model": "email" %>
      </div>
      <%= form.submit "Send" %>
    </div>
    <template x-if="/^(team|webmaster|marketing|admin|info|about|support|sales|hq|hello)@/.test(email)">
      <div class="warning mt1">⚠️ For security, we discourage team emails on HCB. We recommend individual emails such as <em>ben@hackclub.com</em>!</div>
    </template>
  </div>

^ This implementation uses Alpine.js

@Chay2203
Copy link
Contributor

Sure, will look at it

@grymmy grymmy added the enhancement New feature or request label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants