fix: add channel and pageType
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user