Skip to content

Bring authentication back into the app - #15

Merged
SourovCodes merged 1 commit into
mainfrom
restore/local-authentication
Sep 20, 2026
Merged

SourovCodes merged 1 commit into
mainfrom
restore/local-authentication

Conversation

@SourovCodes

Copy link
Copy Markdown
Member

Signing in through 3AG Accounts cost more than it saved: another service to run, deploy and hold credentials for, so that three apps that already knew how to log people in could log people in. This takes the OIDC client out and puts the app's own authentication back.

What comes back

Fortify, as it was before the move: registration, login, password reset, email verification, two-factor and passkeys, the security settings page, and an editable profile.

This is the pre-SSO code restored from 3d69e74, not a reimplementation — the deleted files return unchanged.

What goes

AccountsSsoController, LoginController, LogoutController, config/oidc.php, the ACCOUNTS_* environment, the 3agapp/accounts-oidc requirement and the VCS repository entry that pulled it in.

Schema

A migration rather than a file deletion, because the SSO migrations have already run in production. It re-adds the two-factor columns and the passkeys table and drops sso_id, guarding every step so it is correct both on a database that went through the SSO migrations and on one built from scratch. The suite migrates through the SSO migrations first, so it exercises exactly the production path.

Deliberately kept

Two things from that period, because neither is about SSO:

  • the app's own error pages and the ErrorBoundary;
  • the removal of a verified middleware that never did anything — this User has never implemented MustVerifyEmail, so EnsureEmailIsVerified passed everyone through. Say the word if you would rather have it back for symmetry.

Before merging

Anyone whose account was created by the SSO callback holds a random password nobody knows. They will need the password reset flow, which is live again, to set one.

Verification

php artisan test — 298 passed, including the restored browser tests for login, registration and the two-factor challenge.

🤖 Generated with Claude Code

Signing in through 3AG Accounts turned out to cost more than it saved:
one more service to run, deploy and keep credentials for, to log into
three apps that already knew how to log people in. So this puts back the
authentication the app had before the move -- Fortify, with registration,
password reset, email verification, two-factor and passkeys -- and drops
the OIDC client entirely.

Everything here is the pre-SSO code restored from 3d69e74, not a rewrite.
What the SSO work deleted comes back as it was; what it added is gone:
the Accounts controllers, config/oidc.php, the ACCOUNTS_* environment, and
the accounts-oidc package along with the VCS repository entry that pulled
it in.

The schema needs a migration rather than a file deletion, because the SSO
migrations have already run in production. The new one re-adds the
two-factor columns and the passkeys table and drops `sso_id`, and guards
every step so it is correct both on a database that went through the SSO
migrations and on one built from scratch.

Two things from that period are deliberately kept, because neither is
about SSO: the app's own error pages, and the removal of a `verified`
middleware that never did anything (this User has never implemented
MustVerifyEmail, so EnsureEmailIsVerified passed everyone through).

Anyone whose account was created by the SSO callback has a random
password nobody holds; they will need the password reset flow, which is
live again, to pick one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@SourovCodes
SourovCodes merged commit 6b7ddcb into main Sep 20, 2026
1 check 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