Skip to content

Commit

Permalink
Fix: Login error when GitHub account does not have a display name (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
hieuwu authored Nov 9, 2020
1 parent 9ddd9a5 commit 85fc4fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions retro-board-server/src/auth/passport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export default (store: Store) => {
profile: any,
cb: Function
) => {
if (profile.displayName == null) {
profile.displayName = profile.username ||
(profile.emails.length ? profile.emails[0].value : '');
}
const user: User = {
accountType: type,
id: v4(),
Expand Down

0 comments on commit 85fc4fa

Please sign in to comment.