Skip to content

Commit 90a6a00

Browse files
author
Eduard Babinyan
authored
feat(provider): return image for Yandex by default (#2563)
Uploading an user image.
1 parent cb844a2 commit 90a6a00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/providers/yandex.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default function Yandex(options) {
44
name: "Yandex",
55
type: "oauth",
66
version: "2.0",
7-
scope: "login:email login:info",
7+
scope: "login:email login:info login:avatar",
88
params: { grant_type: "authorization_code" },
99
accessTokenUrl: "https://oauth.yandex.ru/token",
1010
requestTokenUrl: "https://oauth.yandex.ru/token",
@@ -15,7 +15,7 @@ export default function Yandex(options) {
1515
id: profile.id,
1616
name: profile.real_name,
1717
email: profile.default_email,
18-
image: null,
18+
image: profile.is_avatar_empty ? null : `https://avatars.yandex.net/get-yapic/${profile.default_avatar_id}/islands-200`,
1919
}
2020
},
2121
...options,

0 commit comments

Comments
 (0)