Fix external service authentication (#4846)

This commit is contained in:
Satsuki Yanagi
2019-05-03 18:38:19 +09:00
committed by syuilo
parent 9d1ed1eb0d
commit 0e764a2b3e
5 changed files with 35 additions and 24 deletions

View File

@ -193,12 +193,8 @@ router.get('/gh/cb', async ctx => {
}
const link = await UserProfiles.createQueryBuilder()
.where('github @> :github', {
github: {
id: id,
},
})
.andWhere('userHost IS NULL')
.where('"githubId" = :id', { id: id })
.andWhere('"userHost" IS NULL')
.getOne();
if (link == null) {