Advertising sustains the DA. Ads are hidden for members. Join today

Social Auth Amazon 2.x - Installation instructions

Last updated on
5 July 2019

Social Auth Amazon module depends on The League OAuth2 Amazon library and uses Composer to download it. Composer can automatically download the correct version of the library for you.

Overview of installation steps

  1. Step 1: Create an Amazon application and get credentials by going to  https://login.amazon.com/manageApps
  2. Step 2: Download Social Auth Amazon and The League OAuth2 Amazon library using Composer.
  3. Step 3: Enable and configure Social Auth Amazon module.

Step 1: Create a project

Step 2: Install Social Auth Amazon and The League OAuth2 Amazon Library.

On the the command line of your server, navigate to your Drupal root directory.

Let Composer download Social Auth Amazon (and all its dependencies). The following command will download the latest 2.x release of Social Auth Amazon:

composer require "drupal/social_auth_amazon:~2.0"

If you would like to use the 2.x-dev version instead, use the following command:

composer require "drupal/social_api:2.x-dev" "drupal/social_auth:2.x-dev" "drupal/social_auth_amazon:2.x-dev"

Social Auth Amazon dev versions are usually only compatible with Social Auth and Social API dev versions. The command above installs the dev branch of all these modules.

Composer will automatically download luchianenco/oauth2-amazon

Step 3: Enable and configure Social Auth Amazon module

Now that Composer has downloaded the Amazon API PHP Client library and other dependencies, you can enable Social Auth Amazon.

  • The module settings can be configured on /admin/config/social-api/social-auth/amazon
  • Add your Client ID and Client Secret (from step 1) to the module settings
  • You probably also want to check your Drupal account settings at /admin/config/people/accounts, making sure that visitors can create accounts

Check installation status and give it a try!

  • After you have completed steps 1-3 above, verify that you can see that Composer has downloaded the The League OAuth2 Amazon library to vendor/luchianenco/oauth2-amazondirectory of your Drupal installation.
  • Add a Social Auth Login block to any region. If you already have added a block before installing this module and nothing is shown, try rebuilding the cache
  • Click on the "Amazon" logo
  • Alternatively you can add a link anywhere on the site that points to user/login/amazon

Support requests

  • Before posting a support request, carefully read the installation instructions provided on this page and do the setup in this order.
  • Once you have done this, you can post a support request at module issue queue. Support requests to the issue queue, please, not to the comments on this documentation page.
  • When posting a support request, please inform if you were able to see any errors in Recent log entries.

Available Scopes for Social Auth Amazon 2.x

In this link, you'll find the list of all available scopes that you can enter in /admin/config/social-api/social-auth/amazon, their descriptions, and their use cases. For most cases using the profilescope is sufficient.

If you want to learn more about the Amazon API and want to tweak the code itself, it is recommended to read the Login with Amazon OAuth API Guide.

Help improve this page

Page status: No known problems

You can: