1. Go to this page and download the library: Download innoboxrr/laravel-auth library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// Reglas del registro, por ejemplo para pedir más campos
RegisterRequest::setCustomRulesCallback(fn ($request) => [...]);
// Lo que responde get-auth
GetAuthRequest::$customGetAuthCallback = fn ($user) => response()->json([...]);
// Login social: entrar en una cuenta existente o registrar una nueva
CallbackRequest::$customLoginCallback = fn ($user, $provider, $providerUser) => ...;
CallbackRequest::$customRegisterCallback = fn ($providerUser, $provider) => ...;
// Sustituir por completo quién puede suplantar
ImpersonateRequest::authorizeUsing(fn ($request) => ...);