Skip to content

Commit 52c574d

Browse files
authored
feat: Add support for totpSecret (#1051)
## Description ## Documentation Does this require changes to the WorkOS Docs? E.g. the [API Reference](https://workos.com/docs/reference) or code snippets need updates. ``` [ ] Yes ``` If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.
1 parent cc2eeda commit 52c574d

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/user-management/interfaces/enroll-auth-factor.interface.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ export interface EnrollAuthFactorOptions {
33
type: 'totp';
44
totpIssuer?: string;
55
totpUser?: string;
6+
totpSecret?: string;
67
}
78

89
export interface SerializedEnrollUserInMfaFactorOptions {
910
type: 'totp';
1011
totp_issuer?: string;
1112
totp_user?: string;
13+
totp_secret?: string;
1214
}

src/user-management/serializers/enroll-auth-factor-options.serializer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ export const serializeEnrollAuthFactorOptions = (
99
type: options.type,
1010
totp_issuer: options.totpIssuer,
1111
totp_user: options.totpUser,
12+
totp_secret: options.totpSecret,
1213
});

src/user-management/user-management.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ describe('UserManagement', () => {
603603
type: 'totp',
604604
totpIssuer: 'WorkOS',
605605
totpUser: 'some_user',
606+
totpSecret: 'secret-test',
606607
});
607608

608609
expect(fetchURL()).toContain(

0 commit comments

Comments
 (0)