Skip to content

Commit

Permalink
packages/js: fix MFA registration init
Browse files Browse the repository at this point in the history
  • Loading branch information
merlindru committed May 15, 2024
1 parent cd2a267 commit f1468ad
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/js/passkeys-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,18 @@ export function tenant(config: { baseUrl?: string; apiKey: string; tenantId: str
},
mfa: {
registration: {
initialize() {
return wrap(client.POST("/{tenant_id}/mfa/registration/initialize", { params }));
initialize(data: { userId: string; username: string; icon?: string; displayName?: string }) {
return wrap(
client.POST("/{tenant_id}/mfa/registration/initialize", {
params,
body: {
user_id: data.userId,
username: data.username,
icon: data.icon,
display_name: data.displayName,
},
})
);
},
finalize(credential: PostRegistrationFinalizeBody) {
return wrap(
Expand Down

0 comments on commit f1468ad

Please sign in to comment.