Custom drivers
Register a SocialiteProviders driver which is not in the list, with the prefix of its columns:app/Providers/AppServiceProvider.php
gl_id field.
Sign in with another CrudAdmin
Thecrudadmin driver signs in with an administrator account of another CrudAdmin, which has OAuth enabled.
app/Providers/AppServiceProvider.php
config/services.php
user_path on the host. The default /admin/api/v1/user is served by crudadmin/api, install it on the CrudAdmin which signs in.
ca_id stores the provider table and the id, e.g. admins_5. Use a string field.
Hooks
Hooks are global callbacks. Register them in a service provider.app/Providers/AppServiceProvider.php
Throw
SocialMessageException in any hook to stop the login and show its message. Other exceptions show the messages.error text of the config and are logged.
Events
app/Providers/EventServiceProvider.php
Success response
Stateless and JSON responses containauth_token, expires_in and previous_path. Add your own data with SUCCESS_DATA_RESPONSE:
Using SocialAuth in your controller
app/Http/Controllers/Auth/SocialController.php
Turn off avatars of all drivers with
SocialAuth::$photoColumn = null, or store them in another field with SocialAuth::$photoColumn = 'avatar'.