Skip to content

wertmenschen/socialite-amazon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Socialite for Login with Amazon

https://login.amazon.com/

Installation

composer require revolution/socialite-amazon

config/app.php

Not necessary in Laravel >= 5.5

    'providers' => [
        ...
        Revolution\Socialite\Amazon\AmazonServiceProvider::class,
    ]

config/services.php

    'amazon' => [
        'client_id'     => env('AMAZON_LOGIN_ID'),
        'client_secret' => env('AMAZON_LOGIN_SECRET'),
        'redirect'      => env('AMAZON_LOGIN_REDIRECT'),
    ],

.env

AMAZON_LOGIN_ID=
AMAZON_LOGIN_SECRET=
AMAZON_LOGIN_REDIRECT=

Usage

routes/web.php

Route::get('/', 'AmazonController@index');
Route::get('callback', 'AmazonController@callback');

AmazonController

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Socialite;

class AmazonController extends Controller
{
    public function index()
    {
        return Socialite::driver('amazon')->redirect();
    }

    public function callback()
    {
        $user = Socialite::driver('amazon')->user();
        dd($user);
    }
}

LICENCE

MIT Copyright (c) 2017 kawax

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%