Add challenge type validation

This commit is contained in:
William Oldham
2023-11-04 09:42:45 +00:00
parent bbd13453b2
commit 9c19cf509b
3 changed files with 21 additions and 7 deletions

View File

@@ -37,7 +37,7 @@ export const manageAuthRouter = makeRouter((app) => {
const challenge = new ChallengeCode();
challenge.authType = 'mnemonic';
challenge.stage = 'registration';
challenge.flow = 'registration';
await em.persistAndFlush(challenge);
@@ -56,6 +56,8 @@ export const manageAuthRouter = makeRouter((app) => {
body.challenge.code,
body.publicKey,
body.challenge.signature,
'registration',
'mnemonic',
);
const user = new User();