remix-auth-email-link
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -30,3 +30,3 @@ import type { SessionStorage } from '@remix-run/server-runtime'; | ||
emailAddress: string; | ||
form: FormData; | ||
form: Record<string, unknown>; | ||
/** | ||
@@ -33,0 +33,0 @@ * When the magic link was created, as an ISO string. This is used to check |
@@ -156,3 +156,6 @@ "use strict"; | ||
emailAddress, | ||
form, | ||
form: Object.fromEntries([...form.keys()].map((key) => [ | ||
key, | ||
form.getAll(key).length > 1 ? form.getAll(key) : form.get(key), | ||
])), | ||
creationDate: new Date().toISOString(), | ||
@@ -219,5 +222,17 @@ validateSessionMagicLink: this.validateSessionMagicLink, | ||
} | ||
return { emailAddress, form }; | ||
const formData = new FormData(); | ||
Object.keys(form).forEach((key) => { | ||
if (Array.isArray(form[key])) { | ||
; | ||
form[key].forEach((value) => { | ||
formData.append(key, value); | ||
}); | ||
} | ||
else { | ||
formData.append(key, form[key]); | ||
} | ||
}); | ||
return { emailAddress, form: formData }; | ||
} | ||
} | ||
exports.EmailLinkStrategy = EmailLinkStrategy; |
{ | ||
"name": "remix-auth-email-link", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"main": "./build/index.js", | ||
@@ -5,0 +5,0 @@ "types": "./build/index.d.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29443
372