From 6bc166887775a85144a3f94399a1be2c97b609c0 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 13 Jan 2020 20:03:41 +0530 Subject: [PATCH] chore: Amazon Adapter changes --- src/Auth/OAuth/Amazon.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Auth/OAuth/Amazon.php b/src/Auth/OAuth/Amazon.php index c5dfecb72..2694e21fe 100644 --- a/src/Auth/OAuth/Amazon.php +++ b/src/Auth/OAuth/Amazon.php @@ -49,13 +49,14 @@ class Amazon extends OAuth foreach ($this->requiredScope as $item) { $this->addScope($item); } - - return 'https://www.amazon.com/ap/oa?' . - 'client_id='.urlencode($this->appID). - '&redirect_uri='.urlencode($this->callback). - '&response_type=code'. - '&state='.urlencode(json_encode($this->state)). - '&scope=profile'; + + return 'https://www.amazon.com/ap/oa?'.http_build_query([ + 'response_type' => 'code', + 'client_id' => $this->appID, + 'scope' => implode(' ', $this->getScopes()), + 'state' => json_encode($this->state), + 'redirect_uri' => $this->callback + ]); } /**