preparing VK login provider
This commit is contained in:
parent
d5b9b714d6
commit
203db4e305
|
@ -18,6 +18,9 @@ class EventServiceProvider extends ServiceProvider
|
|||
Registered::class => [
|
||||
SendEmailVerificationNotification::class,
|
||||
],
|
||||
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
|
||||
'SocialiteProviders\\VKontakte\\VKontakteExtendSocialite@handle',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
"laravel/framework": "^7.0",
|
||||
"laravel/socialite": "^4.3",
|
||||
"laravel/tinker": "^2.0",
|
||||
"laravel/ui": "^2.0"
|
||||
"laravel/ui": "^2.0",
|
||||
"socialiteproviders/vkontakte": "^4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"facade/ignition": "^2.0",
|
||||
|
|
91
composer.lock
generated
91
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "ff16891063a7ade29446e4fe29ce019b",
|
||||
"content-hash": "df4686093c9b4f61257454cf740b781a",
|
||||
"packages": [
|
||||
{
|
||||
"name": "asm89/stack-cors",
|
||||
|
@ -2091,6 +2091,95 @@
|
|||
],
|
||||
"time": "2020-02-21T04:36:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "socialiteproviders/manager",
|
||||
"version": "v3.3.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/SocialiteProviders/Manager.git",
|
||||
"reference": "58b72a667da292a1d0a0b1e6e9aeda4053617030"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/SocialiteProviders/Manager/zipball/58b72a667da292a1d0a0b1e6e9aeda4053617030",
|
||||
"reference": "58b72a667da292a1d0a0b1e6e9aeda4053617030",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"laravel/socialite": "~3.0|~4.0",
|
||||
"php": "^5.6 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^0.9.4",
|
||||
"phpunit/phpunit": "^5.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"SocialiteProviders\\Manager\\ServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"SocialiteProviders\\Manager\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Andy Wendt",
|
||||
"email": "andy@awendt.com"
|
||||
},
|
||||
{
|
||||
"name": "Anton Komarev",
|
||||
"email": "a.komarev@cybercog.su"
|
||||
}
|
||||
],
|
||||
"description": "Easily add new or override built-in providers in Laravel Socialite.",
|
||||
"time": "2019-01-16T07:58:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "socialiteproviders/vkontakte",
|
||||
"version": "v4.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/SocialiteProviders/VKontakte.git",
|
||||
"reference": "cc738ae8b1e72fae0f0b24d3eed26baf8e76a3ef"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/SocialiteProviders/VKontakte/zipball/cc738ae8b1e72fae0f0b24d3eed26baf8e76a3ef",
|
||||
"reference": "cc738ae8b1e72fae0f0b24d3eed26baf8e76a3ef",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.6 || ^7.0",
|
||||
"socialiteproviders/manager": "~2.0 || ~3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"SocialiteProviders\\VKontakte\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Brian Faust",
|
||||
"email": "hello@brianfaust.de"
|
||||
}
|
||||
],
|
||||
"description": "VKontakte OAuth2 Provider for Laravel Socialite",
|
||||
"time": "2018-05-29T17:05:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "swiftmailer/swiftmailer",
|
||||
"version": "v6.2.3",
|
||||
|
|
|
@ -175,6 +175,8 @@ return [
|
|||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
|
||||
\SocialiteProviders\Manager\ServiceProvider::class,
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
|
@ -30,4 +30,11 @@ return [
|
|||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
],
|
||||
|
||||
'vkontakte' => [
|
||||
'client_id' => env('VKONTAKTE_KEY'),
|
||||
'client_secret' => env('VKONTAKTE_SECRET'),
|
||||
'redirect' => env('VKONTAKTE_REDIRECT_URI')
|
||||
],
|
||||
|
||||
|
||||
];
|
||||
|
|
33
database/migrations/2020_03_06_051421_vk.php
Normal file
33
database/migrations/2020_03_06_051421_vk.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class Vk extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->string('token_passwordless')->unique()->nullable();
|
||||
$table->string('token_vk')->unique()->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('token_vk');
|
||||
});
|
||||
}
|
||||
}
|
Reference in a new issue