wbe / loginland
Login social
Installs: 32
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^5.6 || ^7.0
- laravel/socialite: *
This package is not auto-updated.
Last update: 2024-05-04 14:16:47 UTC
README
Install in Laravel 5.5
- Create facebook google oauth connect api keys
You must enable the "Contacts API" and "Google+ API" via the Google API console." in callback input domain_name/callback/google/ google https://console.developers.google.com facebook http://developers.facebook.com
- add to env
SESSION_DOMAIN=<domain_name> fb_client_id=<facebook client id> fb_client_secret=<facebook secret key> fb_redirect_uri=<http://domin_name>/callback/facebook google_client_id=<google client id> google_client_secret=<google secret key> google_redirect_uri=<http://domain_name>/callback/google
- Add to config/app.php:
'providers' => [ Laravel\Socialite\SocialiteServiceProvider::class, Wbe\Loginland\LoginServiceProvider::class, 'aliases' => [ 'Socialite' => Laravel\Socialite\Facades\Socialite::class,
- Add to config/service
'facebook' => [ 'client_id' => env('fb_client_id'), 'client_secret' => env('fb_client_secret'), 'redirect' => env('fb_redirect_uri'), ], 'google' => [ 'client_id' => env('google_client_id'), 'client_secret' => env('google_client_secret'), 'redirect' => env('google_redirect_uri'), ]
- Run into console:
php artisan vendor:publish --provider="Wbe\Loginland\LoginServiceProvider"
php artisan migrate
composer dump-autoload
- In blade you need put button:
<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#head_auth">Login\Register</button>
<button type="button" class="btn btn-info " data-toggle="modal" data-target="#profile_edit">Edit profile</button> <button type="button" class="btn btn-info " data-toggle="modal" data-target="#password_edit">Edit password</button>
in the end of layout
@guest @include('loginland::auth.authModal') @else @include('loginland::account.account') @endguest @yield('styles') @yield('scripts')
login register popup
@include('loginland::auth.authModal')
edit password profile popup
@include('loginland::account.account')
Migrations will create tables and fill it with default data.
language files
message to activate account by email
login.activate_email_message
configuration login
```php
1 - confirm registretion by email
0 - disable confirm
```
default 1
'confirm_registration_email' => env('confirm_registration_email',1),
blade for letter to activate user
'email_registration_activate'=>'',
blade for letter hello
'email_registration_hello'=>'',
user edit password blade
'user_edit_pass'=>'',
user edit profile blade
'user_edit_prof'=>'',
where redirect after user activate account
'redirect_after_activated'=>'/',