fix: analytics login method

This commit is contained in:
wancat committed 2023-11-18 22:22:51 +08:00
1 parent 1ab394f187
commit aed66a4fe5
1 file changed
+1 -2
+1 -2
View File
@@ -3,8 +3,7 @@ import { Session, User } from '@linux-odyssey/models'
function loginMethods(user) {
const methods = []
if (user.hashedPassword) methods.push('password')
if (user.google?.id) methods.push('google')
if (user.github?.id) methods.push('github')
if (user.socialLogins) methods.push(...Object.keys(user.socialLogins))
return methods
}