Skip to content

Commit

Permalink
chore: clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoperra committed Dec 23, 2023
1 parent 697bc15 commit 3832c9e
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 129 deletions.
2 changes: 1 addition & 1 deletion apps/api/src/routes/v1/passkey/finalizeLogin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const route: FastifyPluginAsyncTypebox = async fastify => {
},
});
} catch (e) {
throw fastify.httpErrors.unauthorized(e.originalError.details);
throw fastify.httpErrors.unauthorized((e as any).originalError.details);
}
});
};
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/routes/v1/passkey/finalizeRegistration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const PublicKeyCredentialSchema = Type.Intersect([
Type.Object({
rawId: Type.String(),
clientExtensionResults: Type.Object({}, {additionalProperties: true}),
authenticatorAttachment: Type.Optional(Type.String()),
authenticatorAttachment: Type.String(),
}),
]);

Expand Down
31 changes: 0 additions & 31 deletions apps/codeimage/src/state/auth/passkey/hankoPasskeyState.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class HankoPasskeyAuthProvider {
async registerPasskey(): Promise<{token?: string | undefined}> {
try {
const credentials = await startPasskeyRegistration();
const attestation = await webauthn.create(credentials as any);
const attestation = await webauthn.create(credentials);
const response = await finalizePasskeyRegistration(attestation);
if (!response || !response.token) {
this.state.setJwtSession(null);
Expand Down
95 changes: 0 additions & 95 deletions apps/codeimage/src/state/hanko.ts

This file was deleted.

0 comments on commit 3832c9e

Please sign in to comment.