Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kawax/socialite-amazon
https://github.com/kawax/socialite-amazon
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kawax/socialite-amazon
- Owner: kawax
- License: mit
- Created: 2017-09-13T02:19:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-02T08:27:55.000Z (3 months ago)
- Last Synced: 2024-12-06T16:28:46.703Z (21 days ago)
- Language: PHP
- Size: 21.5 KB
- Stars: 13
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Socialite for Login with Amazon
https://login.amazon.com/
## Requirements
- PHP >= 8.0> No version restrictions. It may stop working in future versions.
## Installation
```
composer require revolution/socialite-amazon
```### config/services.php
```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
```php
Route::get('/', [AmazonController::class, 'index']);
Route::get('callback', [AmazonController::class, 'callback']);
```AmazonController
```php
namespace App\Http\Controllers;use Illuminate\Http\Request;
use Laravel\Socialite\Facades\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