Skip to content

Commit 1273b41

Browse files
author
Valentin Kunz
committed
linkedin: oauth scope parameter is mandatory with v2
Default to basic "Sign In with LinkedIn" scopes. https://docs.microsoft.com/en-gb/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin Signed-off-by: Valentin Kunz <valentin.kunz@b-ite.de>
1 parent f2f188e commit 1273b41

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/OAuth/OAuth2/Service/Linkedin.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ public function __construct(
4141
$scopes = array(),
4242
UriInterface $baseApiUri = null
4343
) {
44+
if (count($scopes) === 0) {
45+
$scopes = array(self::SCOPE_R_LITEPROFILE, self::SCOPE_R_EMAILADDRESS);
46+
}
47+
4448
parent::__construct($credentials, $httpClient, $storage, $scopes, $baseApiUri, true);
4549

4650
if (null === $baseApiUri) {

0 commit comments

Comments
 (0)