PHP code example of cable8mm / laravel-social-auth
1. Go to this page and download the library: Download cable8mm/laravel-social-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/ */
cable8mm / laravel-social-auth example snippets
'providers' => [
Cable8mm\LaravelSocialAuth\SocialAuthServiceProvider::class,
],
$table->string('email')->nullable()->unique();
$table->string('password')->nullable();
$table->string('nickname')->nullable(); // 선택
$table->timestamp('terms_accepted_at')->nullable();
$table->timestamp('privacy_policy_accepted_at')->nullable();
$table->timestamp('marketing_accepted_at')->nullable();
'consent' => [
'providers' => [
'naver' => [
'enabled' => true,
'term_codes' => [
'terms_of_service' => '네이버에서_발급한_이용약관_코드',
'privacy_policy' => '네이버에서_발급한_개인정보처리방침_코드',
'marketing' => '네이버에서_발급한_마케팅_코드',
],
],
],
],
'consent' => [
'user_fields' => [
'terms_of_service' => 'terms_accepted_at',
'privacy_policy' => 'privacy_policy_accepted_at',
'marketing' => 'marketing_accepted_at',
],
],
'redirects' => [
'connect_success' => '/settings/accounts',
'disconnect_success' => '/settings/accounts',
],
use Cable8mm\LaravelSocialAuth\Facades\SocialAuth;
SocialAuth::enabledProviders();
SocialAuth::generateNonce();
bash
php artisan social-auth:install
bash
php artisan migrate
bash
php artisan vendor:publish --tag=social-auth-config
bash
php artisan vendor:publish --tag=social-auth-user-columns
php artisan migrate
bash
php artisan vendor:publish --tag=social-auth-views
bash
php artisan optimize:clear
blade
@if (session('error'))
<div role="alert">{{ session('error') }}</div>
@endif
bash
php artisan config:clear