(secretBase32: string, offsetSteps = 0)
| 57 | "user" in value.data; |
| 58 | |
| 59 | const totpFor = (secretBase32: string, offsetSteps = 0): string => |
| 60 | new TOTP({ |
| 61 | issuer: "test", |
| 62 | label: "test", |
| 63 | algorithm: "SHA1", |
| 64 | digits: MFA_TOTP_DIGITS, |
| 65 | period: MFA_TOTP_STEP_SECONDS, |
| 66 | secret: Secret.fromBase32(secretBase32), |
| 67 | }).generate({ |
| 68 | timestamp: Date.now() + offsetSteps * MFA_TOTP_STEP_SECONDS * 1000, |
| 69 | }); |
| 70 | |
| 71 | const enrollViaService = async ( |
| 72 | userId: string |
no outgoing calls
no test coverage detected