feat: twitch auth module

This commit is contained in:
Nick
2019-04-28 14:11:27 -04:00
parent d80bb928f7
commit 849d4f4774
3 changed files with 20 additions and 11 deletions

View File

@@ -160,7 +160,7 @@ module.exports = class User extends Model {
// Find existing user
let user = await WIKI.models.users.query().findOne({
providerId: profile.id,
providerId: _.toString(profile.id),
providerKey
})
@@ -224,7 +224,7 @@ module.exports = class User extends Model {
// Create account
user = await WIKI.models.users.query().insertAndFetch({
providerKey: providerKey,
providerId: profile.id,
providerId: _.toString(profile.id),
email: primaryEmail,
name: displayName,
pictureUrl: pictureUrl,