Skip to content

Add dev-only /auto_sign_in path to sign in the first user#37

Merged
kcdragon merged 1 commit into
mainfrom
auto-sign-in-dev-path
Jun 15, 2026
Merged

Add dev-only /auto_sign_in path to sign in the first user#37
kcdragon merged 1 commit into
mainfrom
auto-sign-in-dev-path

Conversation

@kcdragon

Copy link
Copy Markdown
Collaborator

Adds an /auto_sign_in path that signs in User.first without a password to speed up local development. The route is only mounted when Rails.env.development?, and the controller adds a defense-in-depth before_action that raises a 404 outside development, so it can never act as a backdoor in production. It uses the existing start_new_session_for helper so session creation and the signed cookie match normal login, and skips the auth/tenant before_actions via allow_unauthenticated_access and allow_without_organization.

🤖 Generated with Claude Code

Signs in User.first without a password to speed up local development.
The route is only mounted in development and the controller also 404s
outside development, so it can never be a backdoor in production.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcdragon kcdragon merged commit 172d63f into main Jun 15, 2026
5 checks passed
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