Skip to content

Commit

Permalink
Remove nickname in MicrosoftOIDC user
Browse files Browse the repository at this point in the history
  • Loading branch information
tnqzh123 committed Jan 27, 2024
1 parent 4a00e46 commit 7193246
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Providers/MicrosoftOIDCProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected function getUserByToken($id_token) {
$user = [
'openid' => $decoded->oid, // 这个 openid 是 OpenID Connect 的 oid,和 Graph API 拿到的 id 不一样
'email' => $decoded->email,
'nickname' => $decoded->name,
// 'nickname' => $decoded->name,
];

return $user;
Expand All @@ -96,7 +96,7 @@ protected function getUserByToken($id_token) {
protected function mapUserToObject(array $user) {
return (new User())->setRaw($user)->map([
'id' => $user['openid'],
'nickname' => $user['nickname'],
// 'nickname' => $user['nickname'],
'email' => $user['email']
]);
}
Expand Down

0 comments on commit 7193246

Please sign in to comment.