Skip to content

Commit 2988c8c

Browse files
committed
Initial commit add all features
0 parents  commit 2988c8c

24 files changed

+960
-0
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/public/assets/node_modules
2+
.DS_Store
3+
composer.lock
4+
/vendor/
5+
/.idea
6+
/.vscode
7+
/.vagrant
8+
npm-debug.log
9+
yarn-error.log

.styleci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
preset: laravel

changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changelog
2+
3+
All notable changes to `LaravelSocialite` will be documented in this file.
4+
5+
## Version 1.0
6+
7+
### Added
8+
- Everything

composer.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "mckenziearts/laravel-socialite",
3+
"description": "Social OAuth authentication for Laravel 5. Drivers: Facebook, Twitter, Google, LinkedIn, Github",
4+
"license": "MIT",
5+
"authors": [
6+
{
7+
"name": "Arthur Monney",
8+
"email": "monneylobe@gmail.com",
9+
"homepage": "https://www.twitter.com/monneyarthur",
10+
"role": "Developer"
11+
}
12+
],
13+
"homepage": "https://github.com/mckenziearts/laravel-socialite",
14+
"keywords": ["Laravel", "Laravel-socialite", "oauth"],
15+
"require": {
16+
"illuminate/support": "~5",
17+
"laravel/socialite": "^3.0"
18+
},
19+
"require-dev": {
20+
"phpunit/phpunit": "~6.0",
21+
"orchestra/testbench": "~3.0"
22+
},
23+
"autoload": {
24+
"psr-4": {
25+
"Mckenziearts\\LaravelSocialite\\": "src/"
26+
}
27+
},
28+
"autoload-dev": {
29+
"psr-4": {
30+
"Mckenziearts\\LaravelSocialite\\Tests\\": "tests"
31+
}
32+
},
33+
"extra": {
34+
"laravel": {
35+
"providers": [
36+
"Mckenziearts\\LaravelSocialite\\LaravelSocialiteServiceProvider"
37+
],
38+
"aliases": {
39+
"LaravelSocialite": "Mckenziearts\\LaravelSocialite\\Facades\\LaravelSocialite"
40+
}
41+
}
42+
}
43+
}

config/laravel-socialite.php

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
3+
return [
4+
/*
5+
|--------------------------------------------------------------------------
6+
| User config
7+
|--------------------------------------------------------------------------
8+
|
9+
| Here you can specify socialite user configs
10+
| *table* : The users tables in your application
11+
|
12+
*/
13+
14+
'users' => [
15+
'table' => 'users',
16+
],
17+
18+
/*
19+
|--------------------------------------------------------------------------
20+
| Socialite provider
21+
|--------------------------------------------------------------------------
22+
|
23+
| Here you can specify the specific provider you need for your application
24+
| Supported: "facebook", "google", "github"
25+
|
26+
*/
27+
28+
'providers' => [
29+
'facebook' => true,
30+
'google' => true,
31+
'github' => true,
32+
//'twitter' => true,
33+
//'linkedin' => true,
34+
],
35+
36+
/*
37+
|--------------------------------------------------------------------------
38+
| Socialite Buttons styles
39+
|--------------------------------------------------------------------------
40+
|
41+
| Socialite buttons default style.
42+
| To use your own css classes, you can modify the following classes
43+
| and replace with yours. By default Boostrap buttons class are used
44+
|
45+
|
46+
| example:
47+
| 'buttons' => [
48+
| 'class' => 'btn btn-social'
49+
| 'icon' => false
50+
| ]
51+
|
52+
| 'buttons' => [
53+
| 'class' => 'btn btn-social btn-block'
54+
| 'icon' => true
55+
| ]
56+
|
57+
*/
58+
59+
'buttons' => [
60+
'class' => 'btn btn-social',
61+
'icon' => true
62+
],
63+
64+
];

contributing.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Contributing
2+
3+
Contributions are welcome and will be fully credited.
4+
5+
Contributions are accepted via Pull Requests on [Github](https://github.com/mckenziearts/laravelsocialite).
6+
7+
# Things you could do
8+
If you want to contribute but do not know where to start, this list provides some starting points.
9+
- Add license text
10+
- Remove rewriteRules.php
11+
- Set up TravisCI, StyleCI, ScrutinizerCI
12+
- Write a comprehensive ReadMe
13+
14+
## Pull Requests
15+
16+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
17+
18+
- **Document any change in behaviour** - Make sure the `readme.md` and any other relevant documentation are kept up-to-date.
19+
20+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
21+
22+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
23+
24+
25+
**Happy coding**!

license.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# The license
2+
3+
Copyright (c) Arthur Monney <monneylobe@gmail.com>
4+
5+
MIT
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class AddSocialitesColumnsToUsers extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::table(config('laravel-socialite.users.table'), function (Blueprint $table) {
17+
foreach (config('laravel-socialite.providers') as $provider => $status) {
18+
if ($status === true) {
19+
$table->string($provider .'_id')->nullable();
20+
}
21+
}
22+
});
23+
}
24+
25+
/**
26+
* Reverse the migrations.
27+
*
28+
* @return void
29+
*/
30+
public function down()
31+
{
32+
Schema::table(config('laravel-socialite.users.table'), function (Blueprint $table) {
33+
foreach (config('laravel-socialite.providers') as $provider => $status) {
34+
if (Schema::hasColumn(config('laravel-socialite.users.table'), $provider.'_id'))
35+
$table->dropColumn($provider.'_id');
36+
}
37+
});
38+
}
39+
}

phpunit.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit bootstrap="vendor/autoload.php"
3+
backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
verbose="true"
7+
convertErrorsToExceptions="true"
8+
convertNoticesToExceptions="true"
9+
convertWarningsToExceptions="true"
10+
processIsolation="false"
11+
stopOnFailure="false">
12+
<testsuites>
13+
<testsuite name="Package">
14+
<directory suffix=".php">./tests/</directory>
15+
</testsuite>
16+
</testsuites>
17+
<filter>
18+
<whitelist>
19+
<directory>src/</directory>
20+
</whitelist>
21+
</filter>
22+
</phpunit>

0 commit comments

Comments
 (0)