Skip to content

Commit a3c0d06

Browse files
fix: encode JWT in 2FA redirect URL to prevent invalid header error (calcom#25331)
Co-authored-by: Pallav <90088723+Pallava-Joshi@users.noreply.github.com>
1 parent cd74f29 commit a3c0d06

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/features/auth/lib/next-auth-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const usernameSlug = (username: string) => `${slugify(username)}-${randomString(
9797
const getDomainFromEmail = (email: string): string => email.split("@")[1];
9898

9999
const loginWithTotp = async (email: string) =>
100-
`/auth/login?totp=${await (await import("./signJwt")).default({ email })}`;
100+
`/auth/login?totp=${encodeURIComponent(await (await import("./signJwt")).default({ email }))}`;
101101

102102
type UserTeams = {
103103
teams: (Membership & {

0 commit comments

Comments
 (0)