register with params

This commit is contained in:
peintnermax
2024-09-10 14:32:20 +02:00
parent e4739b8812
commit 32e1e4bfb6
2 changed files with 12 additions and 1 deletions

View File

@@ -76,6 +76,7 @@ export default function LoginPasskey({
? UserVerificationRequirement.REQUIRED
: UserVerificationRequirement.DISCOURAGED,
) {
setError("");
setLoading(true);
const session = await updateSession({
loginName,

View File

@@ -205,7 +205,17 @@ export default function UsernameForm({
{allowRegister && (
<button
className="transition-all text-sm hover:text-primary-light-500 dark:hover:text-primary-dark-500"
onClick={() => router.push("/register")}
onClick={() => {
const registerParams = new URLSearchParams();
if (organization) {
registerParams.append("organization", organization);
}
if (authRequestId) {
registerParams.append("authRequestId", authRequestId);
}
router.push("/register?" + registerParams);
}}
type="button"
disabled={loading}
>