Skip to content

Commit e0b9b9a

Browse files
committed
chore: clean up code
1 parent ff17bb9 commit e0b9b9a

File tree

5 files changed

+3
-129
lines changed

5 files changed

+3
-129
lines changed

apps/api/src/routes/v1/passkey/finalizeLogin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const route: FastifyPluginAsyncTypebox = async fastify => {
6666
},
6767
});
6868
} catch (e) {
69-
throw fastify.httpErrors.unauthorized(e.originalError.details);
69+
throw fastify.httpErrors.unauthorized((e as any).originalError.details);
7070
}
7171
});
7272
};

apps/api/src/routes/v1/passkey/finalizeRegistration.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const PublicKeyCredentialSchema = Type.Intersect([
2323
Type.Object({
2424
rawId: Type.String(),
2525
clientExtensionResults: Type.Object({}, {additionalProperties: true}),
26-
authenticatorAttachment: Type.Optional(Type.String()),
26+
authenticatorAttachment: Type.String(),
2727
}),
2828
]);
2929

apps/codeimage/src/state/auth/passkey/hankoPasskeyState.ts

-31
This file was deleted.

apps/codeimage/src/state/auth/providers/hanko-passkey.provider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class HankoPasskeyAuthProvider {
6161
async registerPasskey(): Promise<{token?: string | undefined}> {
6262
try {
6363
const credentials = await startPasskeyRegistration();
64-
const attestation = await webauthn.create(credentials as any);
64+
const attestation = await webauthn.create(credentials);
6565
const response = await finalizePasskeyRegistration(attestation);
6666
if (!response || !response.token) {
6767
this.state.setJwtSession(null);

apps/codeimage/src/state/hanko.ts

-95
This file was deleted.

0 commit comments

Comments
 (0)