PHPackages                             n30/socialite-amazon - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. n30/socialite-amazon

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

n30/socialite-amazon
====================

Laravel Socialite for Login with Amazon/AWS Accounts. Social Providers Extention Integrated with Soical Stream.

13.3k↓86.7%PHP

Since Jan 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/N30/Amazon-Socialite)[ Packagist](https://packagist.org/packages/n30/socialite-amazon)[ RSS](/packages/n30-socialite-amazon/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)DependenciesVersions (1)Used By (0)

Socialite Providers "Login with Amazon" Extention Compatible with SocialStream for Jetsream
===========================================================================================

[](#socialite-providers-login-with-amazon-extention-compatible-with-socialstream-for-jetsream)

[![hero](https://camo.githubusercontent.com/a03baa27c0bfbf41a83dce69e502caa5b21a299fbb60305ef34337d509ea928c/68747470733a2f2f6e656f6e6f732e73332e616d617a6f6e6177732e636f6d2f536f6369616c6974652b416d617a6f6e5f4157532b4c6f67696e2e706e67)](https://camo.githubusercontent.com/a03baa27c0bfbf41a83dce69e502caa5b21a299fbb60305ef34337d509ea928c/68747470733a2f2f6e656f6e6f732e73332e616d617a6f6e6177732e636f6d2f536f6369616c6974652b416d617a6f6e5f4157532b4c6f67696e2e706e67)

Requirements
------------

[](#requirements)

- PHP &gt;= 7.2

(&amp; One of the below packages:) in order of prefrence for easy plug and play...

- [joelbutcher/socialstream](https://github.com/joelbutcher/socialstream) Documentation: [Here](https://docs.socialstream.dev/)
- [socialiteproviders/manager](https://github.com/SocialiteProviders/Providers) Documentation: [Here](https://socialiteproviders.com/)
- [laravel/socialite](https://github.com/laravel/socialite) Documentation: [Here](https://laravel.com/docs/9.x/socialite)

If you are looking to implement Login with Amazon into Laravel and you are unsure of which requirement to choose, then if you are using JetStream we recommend social stream. Otherwise with breeze or custom applications use Social Providers.

Installation For Socialite Providers &amp; Basic Usage (Package: SocialiteProviders/Providers)
----------------------------------------------------------------------------------------------

[](#installation-for-socialite-providers--basic-usage-package-socialiteprovidersproviders)

Please see the [Base Installation Guide](https://socialiteproviders.com/usage/), then follow the provider specific instructions below.

Installation without additional packages (No Social Stream/Social Providers)
----------------------------------------------------------------------------

[](#installation-without-additional-packages-no-social-streamsocial-providers)

Please see "Socialite Standalone Usage" below after following the rest of this installation.

Installation
------------

[](#installation)

```
composer require n30/socialiteproviders-amazon
```

The package for flexibility of proficient socialite developers who wish to use their own custom methods, does not require additional packages, if you are not sure make sure to next run the commands, otherwise the package will not work and following the instruction will through an error, so...

Next run:
---------

[](#next-run)

```
composer require socialiteproviders/manager
```

### Add configuration to `config/services.php`

[](#add-configuration-to-configservicesphp)

```
    'amazon' => [
        'client_id'     => env('AMAZON_CLIENT_ID'),
        'client_secret' => env('AMAZON_CLIENT_SECRET'),
        'redirect'      => env('AMAZON_REDIRECT_URI'), //recommended: /oauth/amazon/callback
    ],

```

### Enable Socialite Packag as SocialiteProviders Add provider event listener

[](#enable-socialite-packag-as-socialiteproviders-add-provider-event-listener)

Configure the package's listener to listen for `SocialiteWasCalled` events.

Add the event to your `listen[]` array in `app/Providers/EventServiceProvider`. See the [Base Installation Guide](https://socialiteproviders.com/usage/) for detailed instructions.

```
protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // ... other providers
        \SocialiteProviders\Amazon\AmazonExtendSocialite::class.'@handle',
    ],
];
```

### .env

[](#env)

```
AMAZON_CLIENT_ID=amzn1.application-oa2-client.xxxxxxxxxxxxxxxxxxxx
AMAZON_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxx
AMAZON_REDIRECT_URI="${APP_URL}/oauth/amazon/callback"

```

### Enable for Social Stream

[](#enable-for-social-stream)

If using on Social Stream, edit your config/socialstream.php file to add:

```
    'providers' => [
        Providers::google(),
        Providers::facebook(),
        Providers::twitter(),
        Providers::linkedin(),
        'amazon' //redirect();
    }

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

Amazon API Key
--------------

[](#amazon-api-key)

And last you will need an Amazon API key:

[Amazon Login Documentaiton](https://developer.amazon.com/docs/login-with-amazon/register-other-platforms-cbl-docs.html#create-a-new-security-profile) explains all the details for creating a security profile and then enabling Amazon Login for it.

Create API keys [here](https://developer.amazon.com/loginwithamazon/console/site/lwa/overview.html)

### Usage

[](#usage)

### Social Stream Usage

[](#social-stream-usage)

For more design integrations please see Official Documentation of Social Stream for [Socialite Providers](https://docs.socialstream.dev/getting-started/socialite-providers) based on your Livewire or Intertia implementation. An example of socialstream.blade.php button would be:

```

        {{-- Place your Amazon SVG Icon here... I recommend Blade-ui-icons backage for easy icons: @svg('jam-amazon', "h-6 w-6") --}}
        Amazon

```

### Socialite Standalone &amp; Socialite Provider

[](#socialite-standalone--socialite-provider)

You should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed):

```
return Socialite::driver('amazon')->redirect();
```

### Returned User fields

[](#returned-user-fields)

- `name`
- `email`
- `user_id`

See Amazon [Documentation](https://developer.amazon.com/docs/login-with-amazon/customer-profile.html) for details.

LICENCE
-------

[](#licence)

MIT Copyright (c) 2023 n30

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/345139?v=4)[Neo](/maintainers/n30)[@N30](https://github.com/N30)

---

Top Contributors

[![N30](https://avatars.githubusercontent.com/u/345139?v=4)](https://github.com/N30 "N30 (7 commits)")

### Embed Badge

![Health badge](/badges/n30-socialite-amazon/health.svg)

```
[![Health](https://phpackages.com/badges/n30-socialite-amazon/health.svg)](https://phpackages.com/packages/n30-socialite-amazon)
```

###  Alternatives

[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
