Skip to content

Commit 33a8222

Browse files
committed
Export TOTP symbols to be picked up by demo app.
1 parent 70cbc31 commit 33a8222

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

common/api-review/auth.api.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,10 +750,40 @@ export function signOut(auth: Auth): Promise<void>;
750750
export interface TotpMultiFactorAssertion extends MultiFactorAssertion {
751751
}
752752

753+
// @public
754+
export class TotpMultiFactorGenerator {
755+
static assertionForEnrollment(secret: TotpSecret, oneTimePassword: string): TotpMultiFactorAssertion;
756+
static assertionForSignIn(enrollmentId: string, oneTimePassword: string): TotpMultiFactorAssertion;
757+
// Warning: (ae-forgotten-export) The symbol "FactorId" needs to be exported by the entry point index.d.ts
758+
static FACTOR_ID: FactorId_2;
759+
static generateSecret(session: MultiFactorSession): Promise<TotpSecret>;
760+
}
761+
753762
// @public
754763
export interface TotpMultiFactorInfo extends MultiFactorInfo {
755764
}
756765

766+
// @public
767+
export class TotpSecret {
768+
// (undocumented)
769+
readonly codeIntervalSeconds: number;
770+
// (undocumented)
771+
readonly codeLength: number;
772+
// Warning: (ae-forgotten-export) The symbol "StartTotpMfaEnrollmentResponse" needs to be exported by the entry point index.d.ts
773+
//
774+
// @internal (undocumented)
775+
static _fromStartTotpMfaEnrollmentResponse(response: StartTotpMfaEnrollmentResponse, auth: AuthInternal): TotpSecret;
776+
generateQrCodeUrl(accountName?: string, issuer?: string): string;
777+
// (undocumented)
778+
readonly hashingAlgorithm: string;
779+
// Warning: (ae-forgotten-export) The symbol "TotpVerificationInfo" needs to be exported by the entry point index.d.ts
780+
//
781+
// @internal (undocumented)
782+
_makeTotpVerificationInfo(otp: string): TotpVerificationInfo;
783+
// (undocumented)
784+
readonly secretKey: string;
785+
}
786+
757787
// @public
758788
export class TwitterAuthProvider extends BaseOAuthProvider {
759789
constructor();

packages/auth/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ import { browserPopupRedirectResolver } from './src/platform_browser/popup_redir
7373

7474
// MFA
7575
import { PhoneMultiFactorGenerator } from './src/platform_browser/mfa/assertions/phone';
76+
import {
77+
TotpMultiFactorGenerator,
78+
TotpSecret
79+
} from './src/mfa/assertions/totp';
7680

7781
// Initialization and registration of Auth
7882
import { getAuth } from './src/platform_browser';
@@ -96,5 +100,7 @@ export {
96100
RecaptchaVerifier,
97101
browserPopupRedirectResolver,
98102
PhoneMultiFactorGenerator,
103+
TotpMultiFactorGenerator,
104+
TotpSecret,
99105
getAuth
100106
};

0 commit comments

Comments
 (0)