Skip to content

Commit

Permalink
🐛 修复github用户未设置name导致无法登录的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xkrfer committed May 30, 2022
1 parent 1a3fc0a commit b98e5d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/login/login.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ export class LoginService {
async githubLogin(code: string) {
const data = await githubLogin(code);
const user = await this.createUser(
data.node_id,
`${data.name}@${data.login}`,
data.name,
`github-${data.id}`,
`${data.name || data.id}@${data.login}`,
data.name || data.login,
'github',
);
return this.createToken(user);
Expand Down

0 comments on commit b98e5d4

Please sign in to comment.