feat: one-click dev user sign-in for development, without an OIDC provider #16

Merged
jfro merged 1 commit from dev-login into main 2026-10-15 18:08:19 +00:00
Owner

Signing in during development needed a real OIDC provider (Pocket ID). This adds a Sign in as dev user button to the sign-in page that signs in as dev@localhost, creating the user the first time.

  • New config :rm_analyzer, :dev_login setting, true in dev and test, unset (false) otherwise.
  • POST /dev/log-in (RmAnalyzerWeb.DevLoginController) is only compiled into the router when it's set, so prod has no route at all. Checked with MIX_ENV=prod mix compile --warnings-as-errors and mix phx.routes.
  • The button uses a plain path rather than ~p, so builds without the route don't warn.
  • "Sign-in isn't set up yet" is hidden when dev login is available; the existing test for it now turns dev login off.

Tests: new dev_login_controller_test.exs; full suite 606 passed, mix compile --warnings-as-errors and mix format --check-formatted clean.

Signing in during development needed a real OIDC provider (Pocket ID). This adds a **Sign in as dev user** button to the sign-in page that signs in as `dev@localhost`, creating the user the first time. - New `config :rm_analyzer, :dev_login` setting, true in dev and test, unset (false) otherwise. - `POST /dev/log-in` (`RmAnalyzerWeb.DevLoginController`) is only compiled into the router when it's set, so prod has no route at all. Checked with `MIX_ENV=prod mix compile --warnings-as-errors` and `mix phx.routes`. - The button uses a plain path rather than `~p`, so builds without the route don't warn. - "Sign-in isn't set up yet" is hidden when dev login is available; the existing test for it now turns dev login off. Tests: new `dev_login_controller_test.exs`; full suite 606 passed, `mix compile --warnings-as-errors` and `mix format --check-formatted` clean.
feat: one-click dev user sign-in for development, without an OIDC provider
All checks were successful
CI / test (pull_request) Successful in 1m1s
5f302beb52
jfro merged commit f041fbc318 into main 2026-10-15 18:08:19 +00:00
jfro deleted branch dev-login 2026-10-15 18:08:32 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfro/rm-analyzer!16
No description provided.