Repository navigation
Conversation
…ewritten core - composer: PHP ^8.4, illuminate ^12 || ^13, Testbench ^10 || ^11, branch alias dev-next-gen → 3.x-dev; depends on javaabu/auth v3, forms v2, manifest, permissions v3, stencil and sms-notifications; drops javaabu/helpers, javaabu/activitylog, javaabu/laravel-recaptcha; Passport moves to suggest - CI: Pint, PHP 8.4/8.5 × Laravel 12/13 × lowest/stable, Codecov from one leg, a run without the optional packages, and a check that javaabu/helpers and javaabu/settings v1 stay out of the production tree - Core: MobileNumber model (v2 table kept, hashed codes, expiry, resend interval, attempt lock), InteractsWithMobileNumbers user trait, rules, SendVerificationCode and VerifyVerificationCode actions, a translatable SMS notification, events - README badges for tests, Codecov, Packagist and the licence Refs #1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- MobileLoginMethod: a javaabu/auth LoginMethod, so the login page links to it and Route::authRoutes() registers its routes in each type's guest group. The code finishes with StartAuthenticatedSession: two-factor still applies (skip_two_factor opts out), sessions and LoginResponse as for passwords - Mobile registration: number, code, then a javaabu/stencil details form (MobileRegistrationForm, swappable), users created by CreatesUsersFromMobileNumbers, Registered event, logged in - Route::mobileNumberRoutes(): signed-in users verify or change their number; mobile.verified middleware sends users without one there - API: Route::mobileApiRoutes() for Sanctum/Passport personal tokens, and the optional Passport `mobile` grant, picking the user type from the client's provider - Named rate limiters on top of the per-number expiry, resend interval and lock - Blade pages with javaabu/forms v2 - Users are loaded through the type's guard provider; tests use two guards Refs #2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…actions
- Route::mobileNumberActions('user', [...]): admins change a user's number
without a code, unlock a locked number, or remove it
- MobileNumberPolicy abilities (mobile-verification.update/unlock/remove)
take the managed user type and the account; replace the policy in config
or redefine an ability with Gate::define()
- Permissions update_/unlock_/remove_{type}_mobile_numbers registered with
javaabu/permissions in each type's group, for every type or
managed_user_types; register_permissions turns them off
- Controllers come from mobile-verification.controllers; the code generator
and number format validator resolve through the container
- Tests run with two guards and frozen seconds
Closes #7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- React pages (TypeScript, @javaabu/forms + Onu) for every Blade page: mobile-verification::Login, Register, Verify, RegisterDetails (stencil's StencilForm) and Settings/MobileNumber (javaabu/auth's AccountLayout), shipped through javaabu/manifest; apps import @javaabu/mobile-verification - The stack follows the auth user type, or mobile-verification.views - Dhivehi for every string (lang/dv.json), with a test that fails on a string without Thaana or with different placeholders; SMS in the request's locale; the name field types Thaana on Dhivehi pages - Numbers and codes stay left to right (dir="ltr", <bdi>); a test keeps physical direction utilities out of the views - CI: a React job (typecheck, Vitest) with auth and stencil from vendor/ Closes #6 Refs #5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Docusaurus docs (package-skeleton structure): installation, the user model, logging in, registration, verifying numbers, API, pages (Blade and React side by side), managing numbers, validation rules, configuration, codes and rate limits, the SMS, overriding, events, Dhivehi with the strings to review, API reference, AI assistants, and the upgrade guide from v2 - llms.txt with the rules and every page; AGENTS.md and CLAUDE.md - resources/boost guideline and the javaabu-mobile-verification skill with common mistakes and testing references - docs/ ships in the Composer dist (llms.txt points at it); JS tooling doesn't - README quick start, CHANGELOG for 3.0.0 Closes #3 Closes #4 Closes #5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 of 8 tasks
- Register UserTypes::accountLink('mobile-number', 'Mobile number',
position: 30), so every user type with Route::mobileNumberRoutes() gets
the link in auth's Blade nav and React AccountLayout (n4ff4h/auth#15)
- The React account pages pass account_links to AccountLayout
- Tests: the link per type, none for types without the page, the current
page marked, account_links in the Inertia props and the React nav
- Docs, llms.txt, the Boost skill and the changelog: the app no longer
links the page itself
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v3: mobile login, registration and verification on javaabu/auth v3
A rewrite of javaabu/mobile-verification for the next-gen packages. Tracked on n4ff4h#9 (the fork), where every issue has its decisions.
What's in it
LoginMethod(MobileLoginMethod) of any user type.Route::authRoutes()registers it, and the login page links to it. Once the code is right, auth'sStartAuthenticatedSessiontakes over, so two-factor authentication still applies (skip_two_factoropts out). Nothing assumes thewebguard orApp\Models\User.MobileRegistrationForm, swappable in config). The user is created by aCreatesUsersFromMobileNumbersaction; thenRegisteredfires and the user is logged in.Route::mobileNumberRoutes()account page, linked from javaabu/auth's account navigation for every type that has it (UserTypes::accountLink(), Let packages add links to the account navigation n4ff4h/auth#15), andmobile.verified:{type}middleware for pages that need a verified number.random_int(), stored hashed, single use, and invalid once a newer code is sent.request_code_rulesadds extra checks such as a captcha.VerificationCodeNotification.Route::mobileApiRoutes()issues Sanctum or Passport personal tokens through auth'sApiTokens.mobilegrant is optional. It picks the user type from the client's provider.Route::mobileNumberActions()lets admins change a number without a code, unlock it, or remove it. They sit behindMobileNumberPolicyand per-type javaabu/permissions permissions.docs/upgrading.md),llms.txt, a Laravel Boost guideline and skill, andAGENTS.md.Upgrade notes (full guide in
docs/upgrading.md)mobile_numberstable is unchanged. The migration skips the table if it already exists.LoginsWithMobileNumber,RegistersWithMobileNumber,UpdatesMobileNumber, …). AddMobileLoginMethodto the user types and use the route macros instead. The URLs change tologin/mobile,register/mobileandsettings/mobile-number.Traits\InteractsWithMobileNumbersmoves toConcerns\InteractsWithMobileNumbers.MobileNumberattributes became methods, for exampleis_locked→isLocked().number_format_validator,code_generator,notification,request_code_rules.strings.phpto JSON.Before merging / releasing
composer.json: n4ff4h/auth, forms, manifest, permissions, stencil. Drop these once those packages are released.CODECOV_TOKEN: uploads are configured, but Codecov rejects them without a token.?branch=next-gen(per the next-gen standards); switch them tomainafter merging.docs/advanced-usage/translations.md#for-review.Not done on purpose
🤖 Generated with Claude Code