diff --git a/packages/features/auth/lib/next-auth-options.ts b/packages/features/auth/lib/next-auth-options.ts index fedc3e958a..774b88e59b 100644 --- a/packages/features/auth/lib/next-auth-options.ts +++ b/packages/features/auth/lib/next-auth-options.ts @@ -97,7 +97,7 @@ const usernameSlug = (username: string) => `${slugify(username)}-${randomString( const getDomainFromEmail = (email: string): string => email.split("@")[1]; const loginWithTotp = async (email: string) => - `/auth/login?totp=${await (await import("./signJwt")).default({ email })}`; + `/auth/login?totp=${encodeURIComponent(await (await import("./signJwt")).default({ email }))}`; type UserTeams = { teams: (Membership & {