All Projects → mckenziearts → Laravel Oauth

mckenziearts / Laravel Oauth

Licence: other
Social OAuth authentication for Laravel 5 & 6. Drivers: Facebook, Twitter, Google, LinkedIn, Github, Bitbucket.

Projects that are alternatives of or similar to Laravel Oauth

Socialite
Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, you can easily use it without Laravel.
Stars: ✭ 1,026 (+1873.08%)
Mutual labels:  laravel, oauth, social-login
Larapush
artisan push - Deploy your codebase into your web server with one Laravel artisan command and no SSH needed!
Stars: ✭ 150 (+188.46%)
Mutual labels:  laravel, oauth
Laravel Hackathon Starter
💻 A hackathon/MVP boilerplate for laravel web applications. Start your hackathons without hassle.
Stars: ✭ 1,589 (+2955.77%)
Mutual labels:  laravel, social-login
Play Pac4j
Security library for Play framework 2 in Java and Scala: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 375 (+621.15%)
Mutual labels:  oauth, social-login
Weixin
[READ ONLY] Subtree split of the SocialiteProviders/Weixin Provider (see SocialiteProviders/Providers)
Stars: ✭ 84 (+61.54%)
Mutual labels:  laravel, oauth
Laqul
A complete starter kit that allows you create amazing apps that look native thanks to the Quasar Framework. Powered by an API developed in Laravel Framework using the easy GraphQL queries language. And ready to use the Google Firebase features.
Stars: ✭ 110 (+111.54%)
Mutual labels:  laravel, social-login
jax-rs-pac4j
Security library for JAX-RS and Jersey
Stars: ✭ 48 (-7.69%)
Mutual labels:  oauth, social-login
Socialloginmanager
DEPRECATED
Stars: ✭ 178 (+242.31%)
Mutual labels:  oauth, social-login
Laravel Imap
Laravel IMAP is an easy way to integrate both the native php-imap module and an extended custom imap protocol into your Laravel app.
Stars: ✭ 416 (+700%)
Mutual labels:  laravel, oauth
Buji Pac4j
pac4j security library for Shiro: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 444 (+753.85%)
Mutual labels:  oauth, social-login
Qq
[READ ONLY] Subtree split of the SocialiteProviders/QQ Provider (see SocialiteProviders/Providers)
Stars: ✭ 50 (-3.85%)
Mutual labels:  laravel, oauth
Gocialite
Social oAuth login in Go has never been so easy
Stars: ✭ 237 (+355.77%)
Mutual labels:  oauth, social-login
Pow assent
Multi-provider authentication for your Pow enabled app
Stars: ✭ 236 (+353.85%)
Mutual labels:  oauth, social-login
Passport Social Grant
Stars: ✭ 114 (+119.23%)
Mutual labels:  laravel, social-login
Spring Security Pac4j
pac4j security library for Spring Security: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 231 (+344.23%)
Mutual labels:  oauth, social-login
undertow-pac4j
Security library for Undertow: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 35 (-32.69%)
Mutual labels:  oauth, social-login
Spring Webmvc Pac4j
Security library for Spring Web MVC: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 110 (+111.54%)
Mutual labels:  oauth, social-login
Spark Pac4j
Security library for Sparkjava: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 154 (+196.15%)
Mutual labels:  oauth, social-login
Spruce
A social networking platform made using Node.js and MongoDB
Stars: ✭ 399 (+667.31%)
Mutual labels:  oauth, social-login
Laravel Boilerplate
Laravel Boilerplate / Starter Kit with Gentelella Admin Theme
Stars: ✭ 704 (+1253.85%)
Mutual labels:  laravel, social-login

Latest Version on Packagist Total Downloads Build Status Scrutinizer Code Quality StyleCI

Introduction

Social OAuth authentication for Laravel 5 which provides oAuth support in PHP 5.3+ and is very easy to integrate with any project which requires an oAuth client. This package use Laravel Socialite. For Laravel 4 look this package

Supported services

The library supports OAuth 2.0 compliant services. A list of currently implemented services can be found below. More services will be implemented soon.

Included service implementations:

  • OAuth2
    • Facebook
    • GitHub
    • Google
    • Instagram
    • LinkedIn
    • Bitbucket
    • Twitter
    • Dribbble
    • Pinterest
    • Youtube
    • Gitlab
  • more to come!

Laravel Support version

Laravel laravel-oauth
<=5.5 ^1.0
6.0 ^1.1

Installation

  1. Include the package in your project using Composer
$ composer require mckenziearts/laravel-oauth
  1. Add the service provider to your config/app.php providers array:

    For Laravel 5.5.+ - you're done.

Mckenziearts\LaravelOAuth\LaravelOAuthServiceProvider::class,
  1. Publish the Vendor Assets files by running:
php artisan vendor:publish --provider="Mckenziearts\LaravelOAuth\LaravelOAuthServiceProvider"
  1. Now that we have published a few new files to our application we need to reload them with the following command:
composer dump-autoload

Configuration

When you published the vendor assets you added a new file inside of your config folder which is called config/laravel-oauth.php. This file contains a bunch of configuration you can use to configure your connexion using social networks.

First, you have to add your service like is defined on The official documentation of Socialite available here. Just setup your Oauth services for your application. Laravel/socialite is automatically installed by this package.

Usage

  1. Fisrt of all in the config/laravel-oauth.php file you must define the default users table name to simplify migrations. By default users table is used
'users' => [
    'table'   => 'users',
],
  1. Secondly you must specify the providers to use for social login in the providers array. To active a provider set the value to true
  'providers' => [
    'facebook'  => true,
    'google'    => true,
    'github'    => true,
  ],

The last configuration is to stylize the button by editing class name and add or remove icon

Next, if you may want to re-publish the laravel-oauth assets, config, and the migrations run the following command:

php artisan vendor:publish --tag=laravel-oauth.assets --force
php artisan vendor:publish --tag=laravel-oauth.config --force
php artisan vendor:publish --tag=laravel-oauth.migrations --force
  1. Next to make sure you have the latest database schema run:
php artisan migrate
  1. Inside of your master.blade.php file include a header yield. Inside the head of your master or app.blade.php add the following:
@yield('css')
  1. Add the blade directive to your view where you want to display the socials buttons. The directive takes a parameter login to display the login text or resgister for the text related to the registration
@socialite('login')
  1. Add the style of the buttons by adding this to your view in the section in the @yield('css') who defined in your master layout
@section('css')
    <link href="{{ url('/vendor/mckenziearts/laravel-oauth/assets/css/socialite.css') }}" rel="stylesheet">
@endsection
  1. In the Auth\LoginController of your application, add the OAuthSocialite trait:
namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Mckenziearts\LaravelOAuth\Traits\OAuthSocialite;

class LoginController extends Controller
{
    use OAuthSocialite;
    ..

With this feature you can overwrite the present methods on the trait if you want to customize them even more

  1. Add this routes to your default web route file
Route::get('/auth/{provider}', 'Auth\[email protected]');
Route::get('/callback/{provider}', 'Auth\[email protected]');

Change log

Please see the changelog.md for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

MIT. Please see the license.md for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].