Merge branch 'main' into login-passkey

This commit is contained in:
Max Peintner
2023-07-04 08:53:45 +02:00
6 changed files with 19 additions and 20 deletions

View File

@@ -44,7 +44,7 @@ export default async function Page({
<Alert type={AlertType.INFO}>
<span>
A passkey is an authentication method on a device like your
fingerprint, Apple FaceID or similar.{" "}
fingerprint, Apple FaceID or similar.
<a
className="text-primary-light-500 dark:text-primary-dark-500 hover:text-primary-light-300 hover:dark:text-primary-dark-300"
target="_blank"

View File

@@ -173,20 +173,20 @@ export async function addHumanUser(
{ email, firstName, lastName, password }: AddHumanUserData
): Promise<string> {
const mgmt = user.getUser(server);
const payload = {
email: { email },
username: email,
profile: { firstName, lastName },
};
return mgmt
.addHumanUser(
password
? {
email: { email },
username: email,
profile: { firstName, lastName },
...payload,
password: { password },
}
: {
email: { email },
username: email,
profile: { firstName, lastName },
},
: payload,
{}
)
.then((resp: AddHumanUserResponse) => {

View File

@@ -152,12 +152,11 @@ export default function RegisterPasskey({ sessionId, isPrompt }: Props) {
.catch((error) => {
console.error(error);
setLoading(false);
// setError(error);
setError(error);
return null;
});
}
// return router.push(`/accounts`);
});
}