Skip to content

feature: user management (login/logout)#34

Merged
romanc merged 31 commits intomainfrom
auth-login
Sep 29, 2025
Merged

feature: user management (login/logout)#34
romanc merged 31 commits intomainfrom
auth-login

Conversation

@romanc
Copy link
Owner

@romanc romanc commented Jun 22, 2025

Description

This PR adds basic user management (sign up, log in, log out, password reset, email change, account deletion). This works "out of the box" with mix phoenix auth gen. Mail server setup and config was a charm as always... In the end, I've extended the generated code such that users can delete their (own) account. In addition

  • a bit of HTML work on the home page,
  • a simple privacy policy,
  • and an FAQ page

Remaining things to do:

  • wire up mailserver to send emails for user registration
  • setup staging instance to test deployments / releases (e.g. mail server setup)
    • staging database
    • runner service to run release candidates on port 4004
    • staging server rc.cklist.org (dns entry and certificate update)
      Bonus points for adding a https://www.cklist.org -> https://cklist.org redirect
    • staging server nginx config
  • Test mailserver config (login / pw-reset email) in staging environment
    • Fixed issue with migrate script on deployment
    • Changed adapter to Swoosh.Adapter.*
    • Configure either SMTP or Mua to send emails via mail.cklist.org
  • Prune GHA secrets (e.g. no need for prod DB)
  • Prune dependencies. We use Swoosh SMTP Adapter now, so we need this and gen_smtp and don't need Mua and its dependencies.
  • update email templates and sender in lib/cklist/accounts/user_notifier.ex
  • new tests: describe "about page" / "contains current app version" / "renders faq"
  • simple privacy policy (needed since people can login now and we thus store personal information)
  • fix login tests (can't find user's email address anymore, which is in the generated html template)
  • allow users to delete their account (from settings)
    • functionality && manual testing
    • automated tests

Checklist

Guess what, we use checklists too 😉

  • I did a self-review of the proposed changes
  • I commented my code, particularly in hard-to-understand areas
  • I added automated tests for new functionality (if applicable)

@romanc romanc force-pushed the auth-login branch 5 times, most recently from 1ef4474 to 638d10a Compare July 27, 2025 23:03
romanc pushed a commit that referenced this pull request Aug 10, 2025
Things I learned during work on PR #34:

- A dummy DATABASE_URL is sufficient to build the release
- Run migrations as part of `ExecStartPre` in the service file
  definition. This allows to re-use the production env vars already
  configured in the service defintion file.
@romanc romanc mentioned this pull request Aug 10, 2025
3 tasks
romanc added a commit that referenced this pull request Aug 10, 2025
# Description

This PR splits out things I've learned during work on PR #34:

- A dummy DATABASE_URL is sufficient to build the release
- Run migrations as part of `ExecStartPre` in the service file
definition. This allows to re-use the production env vars already
configured in the service defiintion file.

## Checklist

Guess what, we use checklists too 😉

- [x] I did a self-review of the proposed changes
- [x] I commented my code, particularly in hard-to-understand areas
- [ ] I added automated tests for new functionality (if applicable): N/A
@romanc romanc force-pushed the auth-login branch 3 times, most recently from 131e13c to 8ee20a1 Compare August 17, 2025 11:39
@romanc romanc marked this pull request as ready for review September 26, 2025 22:05
@romanc romanc changed the title WIP: user management feature: user management (login/logout) Sep 26, 2025
@romanc romanc merged commit a8fd17f into main Sep 29, 2025
4 checks passed
@romanc romanc deleted the auth-login branch September 29, 2025 19:25
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.

1 participant