feat: SW-158 Tracking support

This commit is contained in:
Hrishikesh Vaipurkar
2024-07-31 14:40:27 +02:00
parent 0b6b88e8e7
commit cdd83a4346
2 changed files with 3 additions and 6 deletions
+2 -5
View File
@@ -10,13 +10,10 @@ import type { JWT } from "next-auth/jwt"
import type { OIDCConfig } from "next-auth/providers"
function getLoginType(user: User) {
// TODO: handle magic link, should be enough to just check for Nonce.
// if (user?.nonce) {
// return LoginTypeEnum.MagicLink
// }
if (user?.login_with.includes("@")) {
return LoginTypeEnum.email
} else if (user?.login_with.toLowerCase() == LoginTypeEnum["email link"]) {
return LoginTypeEnum["email link"]
} else {
return LoginTypeEnum["membership number"]
}