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

User Authentication site: SMTP custom namespaces don't work on station.locomotive.works #7

Open
greyskin opened this issue Jul 27, 2021 · 0 comments

Comments

@greyskin
Copy link

Steps to reproduce this issue:

Part 1 - Test Default SMTP Namespace

  1. Download a copy of the auth folder (User Authentication site)
  2. Enter SMTP info under SMTP namespace in config/site.yml (i.e. address, port, user_name, password)
  3. Create an user content_entry in data/accounts.yml
  4. Deploy to station.locomotive.works with data (-d)
  5. Visit the Reset Password page (reset_password.liquid) and enter email address of user created in step 3
  6. Check email account and confirm receipt of password_reset_instructions email

Part 2 - Set Up & Test Custom SMTP Namespace

  1. Create a custom SMTP namespace and custom fields in metafields_schema.yml, e.g.
smtp_settings:
  label: Outgoing Email
  fields:

    server:
      label: SMTP Server
      type: string

    username:
      label: Username
      type: string

    password:
      label: Password
      type: string

    port:
      label: Port
      type: string
  1. Add SMTP info under custom SMTP namespace in config/site.yml, e.g.
  smtp_settings:
    server: [same address used in Part 1]
    username: [same username used in Part 1]
    password: [same password used in Part 1]
    port: [same port used in Part 1]
  1. Add fields to allow custom SMTP namespace on reset_password.liquid as per Locomotive CMS documentation, e.g.
<input type="hidden" name="auth_email_smtp_namespace" value="smtp_settings">
<input type="hidden" name="auth_email_smtp_address_alias" value="server">
<input type="hidden" name="auth_email_smtp_port_alias" value="port">
<input type="hidden" name="auth_email_smtp_user_name_alias" value="username">
<input type="hidden" name="auth_email_smtp_password_alias" value="password">
  1. Deploy to station.locomotive.works with data (-d)
  2. Visit the Reset Password page (reset_password.liquid) and enter email address of user created in step 3 (the page alert will report successful email sending)
  3. Check email account and confirm non-receipt of password_reset_instructions email
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

No branches or pull requests

1 participant