fix: add channel and pageType

This commit is contained in:
Christel Westerberg
2024-07-15 09:34:55 +02:00
parent c96008fb78
commit 73cea4ba51
8 changed files with 12 additions and 13 deletions
+4 -4
View File
@@ -8,9 +8,10 @@ import type { NextAuthConfig, User } from "next-auth"
import type { OIDCConfig } from "next-auth/providers"
function getLoginType(user: User) {
if (user?.nonce) {
return LoginTypeEnum.MagicLink
}
// 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
@@ -54,7 +55,6 @@ const customProvider = {
sub: profile.sub,
given_name: profile.given_name,
login_with: profile.login_with,
nonce: profile.nonce,
}
},
} satisfies OIDCConfig<User>