Releases: OneOffTech/laravel-connect-identity
v0.4.0
This release require Laravel 11. If you are upgrading from an older version follow the upgrade guide.
What's Changed
Upgrade guide
This release has two breaking changes and one minor change.
Default user model and identity model namespace (breaking change)
It is assumed that a User model exists and it is in the App\Models
namespace. Additionally the Identity
model, generated by the package, is assumed to be the Models directory. If you previously set models namespace manually to use the models folder you can now remove the configuration.
You can move both the User and Identity models to the App/Models
directory or explicitly configure the package to use your model location.
To configure the location of the models include the following in the AppServiceProvider
's boot method.
\Oneofftech\Identities\Facades\Identity::useIdentityModel(\App\Identity::class);
\Oneofftech\Identities\Facades\Identity::useUserModel(\App\User::class);
Default redirect URL
The default redirect after login/registration is now to /
. Previously it was pointing to the RouteServiceProvider::HOME
constant. To retain the previous behavior define, on each controller, the redirectTo()
method returning the route. The redirectTo
method is now the preferred way of telling the package where to redirect after successful actions.
protected function redirectTo(): string
{
return RouteServiceProvider::HOME;
}
Switch to casts method in models
The generated Identity model used to have the casts property. This should be changed to use the cast method
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'expires_at' => 'datetime',
'registration' => 'bool',
];
}
Full Changelog: v0.3.4...v0.4.0
v0.3.4
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.1
v0.2.0
v0.1.1
v0.1.0
Added
- Handle user registration via third party providers
- Handle user log in via third party providers
- Customizable controllers, migration and models that will live in your application namespace
- Save identity and token inside the database, using encryption and pseudoanonimization
- Provide login/register button as Blade component
- Support all Laravel Socialite and Socialite Providers