Skip to content

Commit

Permalink
[5.x.x] Update Tiktok Provider.php (#1110)
Browse files Browse the repository at this point in the history
  • Loading branch information
moha-ep authored Nov 7, 2023
1 parent 98d7aa6 commit 7376311
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected function getUserByToken($token)
'Authorization' => 'Bearer '.$token,
],
RequestOptions::QUERY => [
'fields' => 'open_id,union_id,display_name,avatar_large_url',
'fields' => 'open_id,union_id,display_name,avatar_large_url,username',
],
]);

Expand All @@ -119,6 +119,7 @@ protected function mapUserToObject($user)

return (new User())->setRaw($user)->map([
'id' => $user['open_id'],
'nickname' => $user['username'] ?? null,
'union_id' => $user['union_id'] ?? null,
'name' => $user['display_name'],
'avatar' => $user['avatar_large_url'],
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ return Socialite::driver('tiktok')->redirect();
# Returned User Fields

- id
- username
- union_id
- name
- avatar
Expand Down

0 comments on commit 7376311

Please sign in to comment.