Skip to content

Rename to laranail/authkit and adopt the org naming conventions - #50

Merged
imanimanyara merged 2 commits into
mainfrom
rename/authkit
Aug 26, 2026
Merged

imanimanyara merged 2 commits into
mainfrom
rename/authkit

Conversation

@imanimanyara

Copy link
Copy Markdown
Member

Renames the package to laranail/authkit and moves the PSR-4 root from Simtabi\Laranail\Auth to Simtabi\Laranail\AuthKit, as part of unifying the family under authkit-*. The GitHub repo has been renamed too; GitHub redirects the old URL.

The rename is the occasion for the naming work the package had not done. Every name a package registers into a host-owned registry has to carry the vendor and the slug, because those registries are flat maps — a second package claiming the same key does not collide loudly, it silently replaces the first.

Surface Before After
config key auth-kit laranail.authkit
config file config/auth-kit.php config/laranail/authkit.php
publish tag auth-kit-config laranail::authkit-config
publish tag auth-kit-social-migrations laranail::authkit-social-migrations
publish tag auth-kit-passkey-migrations laranail::authkit-passkey-migrations
env prefix AUTH_KIT_* AUTHKIT_*

Also in scope, all org conventions:

  • the standard laranail VCS repositories block (console, enumerator, package-tools, captcha, db-tools)
  • branch-alias dev-main -> 0.1.x-dev, so a path or dev checkout satisfies its own constraint
  • composer.lock untracked — the org rule forbids a tracked lock for a library

Guard

tests/Feature/NamingConventionTest.php asserts the config namespace and the absence of any bare publish tag against the live registries, not the provider source, so the guard holds through a refactor of the registration code.

Verification

  • 88 tests pass (was 85; +3 naming guards).
  • Verified in a real Laravel 13 app at laranail/demos/authkit: config('laranail.authkit') resolves, config('auth-kit') is null, and all three namespaced publish tags publish successfully.

Breaking

Anyone reading the old config key, publishing by the old tags, or importing the old namespace. Nothing else in the org depends on this package yet apart from the preset, which is renamed in laranail/authkit-preset#1.

Not in scope

The security and architecture findings from the acceptance review (shadow Fortify routes, captcha coverage, email verification, multi-guard, the REST API's location) are deliberately left for their own milestones — this PR is naming only, plus two installer bugs it directly surfaced.

The package family is unifying under the authkit-* slug, so laranail/auth-kit
becomes laranail/authkit and the PSR-4 root moves from Simtabi\Laranail\Auth to
Simtabi\Laranail\AuthKit.

The rename is the occasion for the naming work the package had not done. Every
name a package registers into a host-owned registry has to carry the vendor and
the slug, because those registries are flat maps: a second package claiming the
same key does not collide loudly, it silently replaces the first, and the damage
surfaces far away as a missing view or the wrong config. Three keys were bare:

  config key      auth-kit                  -> laranail.authkit
  config file     config/auth-kit.php       -> config/laranail/authkit.php
  publish tags    auth-kit-config           -> laranail::authkit-config
                  auth-kit-social-migrations -> laranail::authkit-social-migrations
                  auth-kit-passkey-migrations -> laranail::authkit-passkey-migrations

Environment variables move with the slug: AUTH_KIT_* -> AUTHKIT_*.

A NamingConventionTest asserts the config namespace and the absence of any bare
publish tag against the live registries rather than the provider source, so the
guard survives a refactor of the registration code.

Also declares the standard laranail VCS repositories block and a branch-alias so
a path or dev checkout satisfies its own constraint, and untracks composer.lock,
which the org conventions forbid for a library.

Breaking for anyone reading the old config key, publishing by the old tags, or
importing the old namespace.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR renames the package to laranail/authkit, updates the PSR-4 root namespace to Simtabi\Laranail\AuthKit, and adopts laranail org naming conventions for config keys, publish tags, and environment variable prefixes.

Changes:

  • Renamed package identity and namespaces (laranail/authkit, Simtabi\Laranail\AuthKit\*) across source, tests, and docs.
  • Moved configuration to config/laranail/authkit.php and updated config access from auth-kit.* to laranail.authkit.*.
  • Namespaced vendor publish tags (laranail::authkit-*) and added a naming guard test.

Reviewed changes

Copilot reviewed 90 out of 92 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
workbench/app/Models/User.php Updates import to new AuthKit namespace.
tests/Unit/AuthResultTest.php Updates imports to new AuthKit namespace.
tests/TestCase.php Updates test namespace and service provider import.
tests/Pest.php Updates base TestCase import.
tests/Feature/UpdateUserProfileInformationTest.php Updates action import to new namespace.
tests/Feature/UpdateUserPasswordTest.php Updates action import to new namespace.
tests/Feature/TurnstileTest.php Updates config key usage and imports.
tests/Feature/SocialRedirectActionTest.php Updates action/enum imports to new namespace.
tests/Feature/SocialCallbackActionTest.php Updates model/action/enum imports to new namespace.
tests/Feature/ResolveSocialIdentityTest.php Updates action/model/enum imports to new namespace.
tests/Feature/ResetUserPasswordTest.php Updates action import to new namespace.
tests/Feature/PasswordResetLinkControllerTest.php Updates controller import to new namespace.
tests/Feature/PasskeyTest.php Updates model/provider imports and publish tags.
tests/Feature/NamingConventionTest.php Adds naming convention guards for tags/config keys.
tests/Feature/LogoutUserTest.php Updates action imports to new namespace.
tests/Feature/LoginUserTest.php Updates action import to new namespace.
tests/Feature/IssueTokenForUserTest.php Updates action/support imports to new namespace.
tests/Feature/FindUserByEmailTest.php Updates action import and config key usage.
tests/Feature/CreateSocialAccountActionTest.php Updates action/model/enum imports to new namespace.
tests/Feature/CreateNewUserTest.php Updates action import and config key usage.
tests/Feature/CheckEmailExistsTest.php Updates action import and config key usage.
tests/Feature/AttemptEmailPasswordLoginTest.php Updates action/enum imports and config key usage.
src/Support/UserModelResolver.php Moves namespace and updates config key lookups.
src/Support/TokenResult.php Moves namespace to AuthKit.
src/Support/SocialRedirectResult.php Moves namespace to AuthKit.
src/Support/AuthResult.php Moves namespace and updates enum import.
src/Support/AuthKit.php Moves namespace and updates config key lookups.
src/Services/Turnstile.php Moves namespace to AuthKit.
src/Services/PayPalSocialProvider.php Moves namespace and updates config key lookup.
src/Rules/TurnstileRule.php Moves namespace and updates service import.
src/Relations/PasskeyMorphMany.php Moves namespace to AuthKit.
src/PasskeyAuthenticatable.php Moves namespace and updates relation import.
src/Models/Social.php Moves namespace and updates enum/factory imports.
src/Models/Passkey.php Moves namespace to AuthKit.
src/Http/Requests/CheckEmailExistsRequest.php Moves namespace to AuthKit.
src/Http/Requests/AttemptEmailPasswordLoginRequest.php Moves namespace to AuthKit.
src/Http/Middleware/ValidateTurnstile.php Moves namespace and updates config key lookup.
src/Http/Controllers/AbstractVerifyEmailController.php Moves namespace and updates support import.
src/Http/Controllers/AbstractSocialRedirectController.php Moves namespace and updates contract import.
src/Http/Controllers/AbstractSocialCallbackController.php Moves namespace and updates imports.
src/Http/Controllers/AbstractRegisterController.php Moves namespace and updates imports.
src/Http/Controllers/AbstractPasswordResetLinkController.php Moves namespace and updates config key lookup.
src/Http/Controllers/AbstractNewPasswordController.php Moves namespace and updates config key lookup.
src/Http/Controllers/AbstractLogoutController.php Moves namespace and updates imports.
src/Http/Controllers/AbstractEmailVerificationPromptController.php Moves namespace and updates support import.
src/Http/Controllers/AbstractEmailVerificationNotificationController.php Moves namespace and updates support import.
src/Http/Controllers/AbstractCheckEmailExistsController.php Moves namespace and updates request/contract imports.
src/Http/Controllers/AbstractAuthController.php Moves namespace and updates support import.
src/Http/Controllers/AbstractAttemptEmailPasswordLoginController.php Moves namespace and updates imports.
src/Enums/SocialProvider.php Moves namespace to AuthKit.
src/Enums/AuthStatus.php Moves namespace to AuthKit.
src/Contracts/SocialRedirectActionInterface.php Moves namespace and updates result import.
src/Contracts/SocialCallbackActionInterface.php Moves namespace and updates result import.
src/Contracts/ResolveSocialIdentityInterface.php Moves namespace and updates enum import.
src/Contracts/LogoutUserInterface.php Moves namespace to AuthKit.
src/Contracts/LoginUserInterface.php Moves namespace to AuthKit.
src/Contracts/IssueTokenForUserInterface.php Moves namespace and updates support import.
src/Contracts/FindUserByEmailInterface.php Moves namespace to AuthKit.
src/Contracts/CreateSocialAccountActionInterface.php Moves namespace and updates model/enum imports.
src/Contracts/CheckEmailExistsInterface.php Moves namespace to AuthKit.
src/Contracts/AttemptEmailPasswordLoginInterface.php Moves namespace and updates result import.
src/AuthKitServiceProvider.php Renames package/config/tags and updates service bindings.
src/Actions/UpdateUserProfileInformation.php Moves namespace to AuthKit.
src/Actions/UpdateUserPassword.php Moves namespace and updates support import.
src/Actions/SocialRedirectAction.php Moves namespace and updates imports.
src/Actions/SocialCallbackAction.php Moves namespace and updates imports.
src/Actions/ResolveSocialIdentity.php Moves namespace and updates imports.
src/Actions/ResetUserPassword.php Moves namespace to AuthKit.
src/Actions/LogoutUser.php Moves namespace and updates contract import.
src/Actions/LoginUser.php Moves namespace and updates contract import.
src/Actions/IssueTokenForUser.php Moves namespace and updates imports.
src/Actions/FindUserByEmail.php Moves namespace and updates contract import.
src/Actions/CreateSocialAccountAction.php Moves namespace and updates imports.
src/Actions/CreateNewUser.php Moves namespace and updates support imports/config key usage.
src/Actions/CheckEmailExists.php Moves namespace and updates contract import.
src/Actions/AttemptEmailPasswordLogin.php Moves namespace and updates config key usage.
README.md Updates package name and instructions for tags/env.
docs/social-login.md Updates env prefixes, publish tags, and config key references.
docs/security.md Updates config path and env prefix references.
docs/profile-management.md Updates config key references.
docs/password-updates.md Updates config key references.
docs/password-reset.md Updates config key references.
docs/passkeys.md Updates namespace imports and publish tag.
docs/login.md Updates env prefix reference.
docs/email-verification.md Updates config key reference.
docs/configuration.md Updates publish tag, env prefix, and config key references.
database/factories/SocialFactory.php Moves namespace and updates model/enum references.
config/laranail/authkit.php Adds new namespaced config file and env prefix.
config/auth-kit.php Removes old config file.
composer.json Renames package and updates PSR-4 roots + org conventions.
.gitignore Ignores composer.lock per library convention.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +16 to +18
$bare = array_filter(
array_keys(ServiceProvider::publishableGroups()),
fn (string $tag): bool => str_contains($tag, 'authkit') && ! str_starts_with($tag, 'laranail::'),
Comment thread README.md
php artisan vendor:publish --tag=laranail::authkit-config
```

For a ready-made Blade UI, install `laranail/auth-preset` instead.
Comment thread README.md
# Laravel Auth Kit
# laranail/authkit

Headless authentication for Laravel 13+. No views, routes, or controllers.
Comment on lines +15 to 19
$model = config('laranail.authkit.user_model');

if (! is_string($model) || $model === '') {
$guard ??= config('auth-kit.guard', 'web');
$guard ??= config('laranail.authkit.guard', 'web');
$provider = config("auth.guards.{$guard}.provider", config('auth.defaults.provider'));
Last leftover from the rename sweep: UserModelResolver named auth-kit in the
message it throws when the configured model is not an Eloquent Authenticatable.
@imanimanyara
imanimanyara merged commit 0ddbc15 into main Aug 26, 2026
1 of 3 checks passed
@imanimanyara
imanimanyara deleted the rename/authkit branch August 26, 2026 16:07
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.

2 participants