From b98e5d4b019d153cf8edeeb3e1b9f9182f75cdbd Mon Sep 17 00:00:00 2001 From: xkrfer Date: Mon, 30 May 2022 23:09:37 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8Dgithub?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=9C=AA=E8=AE=BE=E7=BD=AEname=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=97=A0=E6=B3=95=E7=99=BB=E5=BD=95=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/login/login.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/login/login.service.ts b/src/modules/login/login.service.ts index 15242b5..d5fa45e 100644 --- a/src/modules/login/login.service.ts +++ b/src/modules/login/login.service.ts @@ -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);