@firestitch/2fa 12.0.9 → 12.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/modules/code-input/code-input.module.d.ts +8 -0
- package/app/modules/code-input/components/code-input/code-input.component.d.ts +13 -0
- package/app/modules/code-input/components/code-input/index.d.ts +1 -0
- package/app/modules/code-input/index.d.ts +1 -0
- package/app/modules/manage/components/2fa-manage/2fa-manage.component.d.ts +26 -0
- package/app/modules/manage/components/2fa-manage/index.d.ts +1 -0
- package/app/modules/manage/components/app/app.component.d.ts +31 -0
- package/app/modules/manage/components/app/index.d.ts +1 -0
- package/app/modules/manage/components/defaulted/defaulted.component.d.ts +5 -0
- package/app/modules/manage/components/defaulted/index.d.ts +1 -0
- package/app/modules/manage/components/email/email.component.d.ts +25 -0
- package/app/modules/manage/components/email/index.d.ts +1 -0
- package/app/modules/manage/components/emails/emails.component.d.ts +17 -0
- package/app/modules/manage/components/emails/index.d.ts +1 -0
- package/app/modules/manage/components/manage-methods/index.d.ts +1 -0
- package/app/modules/manage/components/manage-methods/manage-methods.component.d.ts +31 -0
- package/app/modules/manage/components/number/index.d.ts +1 -0
- package/app/modules/manage/components/number/number.component.d.ts +26 -0
- package/app/modules/manage/components/numbers/index.d.ts +1 -0
- package/app/modules/manage/components/numbers/numbers.component.d.ts +18 -0
- package/app/modules/manage/components/verification-methods/index.d.ts +1 -0
- package/app/modules/manage/components/verification-methods/verification-methods.component.d.ts +18 -0
- package/app/modules/manage/fs-2f-manage.module.d.ts +31 -0
- package/app/modules/manage/services/index.d.ts +1 -0
- package/app/modules/manage/services/two-factor-manage.service.d.ts +39 -0
- package/app/{components → modules/verification/components}/2fa-verification/2fa-verification.component.d.ts +9 -9
- package/app/{components → modules/verification/components}/2fa-verification-code/2fa-verification-code.component.d.ts +6 -6
- package/app/{components → modules/verification/components}/2fa-verification-methods/2fa-verification-methods.component.d.ts +7 -7
- package/app/modules/verification/fs-2fa-verification.module.d.ts +23 -0
- package/bundles/firestitch-2fa.umd.js +954 -106
- package/bundles/firestitch-2fa.umd.js.map +1 -1
- package/esm2015/app/modules/code-input/code-input.module.js +26 -0
- package/esm2015/app/modules/code-input/components/code-input/code-input.component.js +36 -0
- package/esm2015/app/modules/code-input/components/code-input/index.js +2 -0
- package/esm2015/app/modules/code-input/index.js +2 -0
- package/esm2015/app/modules/manage/components/2fa-manage/2fa-manage.component.js +92 -0
- package/esm2015/app/modules/manage/components/2fa-manage/index.js +2 -0
- package/esm2015/app/modules/manage/components/app/app.component.js +82 -0
- package/esm2015/app/modules/manage/components/app/index.js +2 -0
- package/esm2015/app/modules/manage/components/defaulted/defaulted.component.js +16 -0
- package/esm2015/app/modules/manage/components/defaulted/index.js +2 -0
- package/esm2015/app/modules/manage/components/email/email.component.js +79 -0
- package/esm2015/app/modules/manage/components/email/index.js +2 -0
- package/esm2015/app/modules/manage/components/emails/emails.component.js +43 -0
- package/esm2015/app/modules/manage/components/emails/index.js +2 -0
- package/esm2015/app/modules/manage/components/manage-methods/index.js +2 -0
- package/esm2015/app/modules/manage/components/manage-methods/manage-methods.component.js +118 -0
- package/esm2015/app/modules/manage/components/number/index.js +2 -0
- package/esm2015/app/modules/manage/components/number/number.component.js +81 -0
- package/esm2015/app/modules/manage/components/numbers/index.js +2 -0
- package/esm2015/app/modules/manage/components/numbers/numbers.component.js +44 -0
- package/esm2015/app/modules/manage/components/verification-methods/index.js +2 -0
- package/esm2015/app/modules/manage/components/verification-methods/verification-methods.component.js +63 -0
- package/esm2015/app/modules/manage/fs-2f-manage.module.js +108 -0
- package/esm2015/app/modules/manage/services/index.js +2 -0
- package/esm2015/app/modules/manage/services/two-factor-manage.service.js +123 -0
- package/esm2015/app/modules/verification/components/2fa-verification/2fa-verification.component.js +109 -0
- package/esm2015/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.js +57 -0
- package/esm2015/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.js +73 -0
- package/esm2015/app/modules/verification/fs-2fa-verification.module.js +88 -0
- package/esm2015/public_api.js +5 -7
- package/fesm2015/firestitch-2fa.js +820 -53
- package/fesm2015/firestitch-2fa.js.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +4 -2
- package/app/fs-2fa.module.d.ts +0 -23
- package/esm2015/app/components/2fa-verification/2fa-verification.component.js +0 -107
- package/esm2015/app/components/2fa-verification-code/2fa-verification-code.component.js +0 -57
- package/esm2015/app/components/2fa-verification-methods/2fa-verification-methods.component.js +0 -73
- package/esm2015/app/fs-2fa.module.js +0 -88
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firestitch-2fa.js","sources":["../../src/app/tokens/verification.token.ts","../../src/app/enums/verification-method-type.enum.ts","../../src/app/components/2fa-verification-methods/2fa-verification-methods.component.ts","../../src/app/components/2fa-verification-methods/2fa-verification-methods.component.html","../../src/app/components/2fa-verification-code/2fa-verification-code.component.ts","../../src/app/components/2fa-verification-code/2fa-verification-code.component.html","../../src/app/components/2fa-verification/2fa-verification.component.ts","../../src/app/components/2fa-verification/2fa-verification.component.html","../../src/app/fs-2fa.module.ts","../../src/public_api.ts","../../src/firestitch-2fa.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nimport { IFsVerificationProvider } from '../interfaces/verification-provider.interface';\n\nexport const FS_2FA_VERIFICATION_PROVIDER = new InjectionToken<IFsVerificationProvider>(\n 'Provider for Verification service',\n);\n","export enum FsVerificationMethodType {\n Sms = 'sms',\n Email = 'email',\n App = 'app',\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { Observable } from 'rxjs';\nimport { map, shareReplay, tap } from 'rxjs/operators';\n\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\nimport { IFsVerificationProvider } from '../../interfaces/verification-provider.interface';\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\n\n\n@Component({\n templateUrl: './2fa-verification-methods.component.html',\n styleUrls: [\n './2fa-verification-methods.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FaVerificationMethodsComponent {\n\n public method: IFsVerificationMethod;\n public phone: string;\n public code: string;\n public methods$: Observable<Record<string, IFsVerificationMethod[]>>;\n public readonly verificationMethodType = FsVerificationMethodType;\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n private _verificationProvider: IFsVerificationProvider,\n @Inject(MAT_DIALOG_DATA)\n private _dialogData: any,\n private _dialogRef: MatDialogRef<Fs2FaVerificationMethodsComponent>,\n ) {\n this._setActiveMethod();\n this._initMethods();\n }\n\n public compareWith(o1, o2) {\n return o1 && o2 && o1.id === o2.id\n }\n\n public setVerificationMethod = () => {\n return this._verificationProvider\n .updateVerificationMethod(this.method.id)\n .pipe(\n tap((method: IFsVerificationMethod) => {\n this._dialogRef.close(method);\n })\n );\n };\n\n private _setActiveMethod(): void {\n this.method = this._dialogData?.method;\n }\n\n private _initMethods(): void {\n this.methods$ = this._verificationProvider\n .methods()\n .pipe(\n map((methods) => {\n return methods\n .reduce((acc, method) => {\n if (!acc[method.type]) {\n acc[method.type] = [];\n }\n\n acc[method.type].push(method);\n\n return acc;\n }, {});\n }),\n shareReplay(1),\n );\n }\n}\n","<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container *fsSkeleton=\"methods$ | async as methods\">\n <fs-radio-group [(ngModel)]=\"method\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of methods | keyvalue\">\n <div class=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n textsms\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n phone_iphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Authenticator App</div>\n <div class=\"method-subtitle\">\n Verification code generated by an authenticator app\n </div>\n </div>\n </div>\n </ng-container> \n </ng-container>\n\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n {{ method.phoneNumber }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n {{ method.email }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n Authenticator App\n </ng-container> \n </ng-container>\n </mat-radio-button>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { ControlContainer, NgForm } from '@angular/forms';\nimport { CodeInputComponent } from 'angular-code-input';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\n\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\n\n\n@Component({\n selector: 'fs-2fa-verification-code',\n templateUrl: './2fa-verification-code.component.html',\n styleUrls: [\n './2fa-verification-code.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [\n {\n provide: ControlContainer,\n useExisting: NgForm,\n },\n ],\n})\nexport class Fs2FAVerificationCodeComponent {\n\n @ViewChild(CodeInputComponent)\n public codeInputComponent: CodeInputComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Input()\n public code;\n\n @Output()\n public codeChanged = new EventEmitter<string>();\n\n @Output()\n public codeCompleted = new EventEmitter<void>();\n\n public FsVerificationMethodType = FsVerificationMethodType;\n\n public codeChange(code): void {\n this.code = code;\n this.codeChanged.emit(this.code);\n }\n\n public focus(): void {\n this.codeInputComponent.focusOnField(0);\n }\n\n}\n","<ng-container *ngIf=\"method.phoneNumber && method.type === FsVerificationMethodType.Sms\">\n <p class=\"description\">\n A text message with a verification code was just\n sent to <span style=\"white-space: nowrap;\">{{ method.phoneNumber }}</span> to verify it's you.\n </p>\n\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.Email\">\n <p class=\"description\">\n A email with a verification code was just sent to {{ method.email }} to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.App\">\n <p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator app to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n\n<ng-template #input> \n <code-input \n [code]=\"code\"\n [initialFocusField]=\"0\"\n [codeLength]=\"6\"\n (codeChanged)=\"codeChange($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </code-input> \n</ng-template> ","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport { FsDialog } from '@firestitch/dialog';\n\nimport { filter, takeUntil, tap } from 'rxjs/operators';\n\nimport { IFsVerificationMethod } from '../../interfaces/verification-method.interface';\nimport { Fs2FaVerificationMethodsComponent } from '../2fa-verification-methods/2fa-verification-methods.component';\nimport { Subject } from 'rxjs';\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';\nimport { IFsVerificationProvider } from '../../interfaces/verification-provider.interface';\nimport { FsVerificationMethodType } from '../../enums/verification-method-type.enum';\nimport { Fs2FAVerificationCodeComponent } from '../2fa-verification-code/2fa-verification-code.component';\n\n\n@Component({\n selector: 'fs-2fa-verification',\n templateUrl: './2fa-verification.component.html',\n styleUrls: [\n './2fa-verification.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2FAVerificationComponent implements OnDestroy, AfterViewInit, OnInit {\n\n @ViewChild(Fs2FAVerificationCodeComponent)\n public verificationCodeComponent: Fs2FAVerificationCodeComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public verified = new EventEmitter<unknown>();\n\n @Output()\n public codeChanged = new EventEmitter<unknown>();\n\n @Output()\n public codeCompleted = new EventEmitter<unknown>();\n\n public resendInProgress = false;\n public code = '';\n public trustedDevice = true;\n public FsVerificationMethodType = FsVerificationMethodType;\n\n private _destroy$ = new Subject<void>();\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n public verificationProvider: IFsVerificationProvider,\n private _cdRef: ChangeDetectorRef,\n private _dialog: FsDialog,\n ) {\n }\n\n public ngOnInit(): void {\n this.codeChanged\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe((code: string) => {\n this.code = code;\n });\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public verify = () => {\n return this.verificationProvider\n .verify(this.code, this.trustedDevice)\n .pipe(\n tap((response) => {\n this.verified.emit(response);\n }),\n );\n };\n\n public ngAfterViewInit(): void {\n this.verificationCodeComponent.focus(); \n }\n\n public resend(): void {\n this.resendInProgress = true;\n this.code = '';\n\n this.verificationProvider\n .resend()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.resendInProgress = false; \n this._cdRef.markForCheck();\n })\n }\n\n public showVerificationMethods(): void {\n this._dialog.open(\n Fs2FaVerificationMethodsComponent,\n {\n data: {\n method: this.method,\n }\n }\n )\n .afterClosed()\n .pipe(\n filter((method) => !!method),\n )\n .subscribe((method) => {\n this.method = method;\n this.code = '';\n\n this._cdRef.markForCheck();\n\n setTimeout(() => {\n this.verificationCodeComponent.focus();\n });\n });\n }\n\n}\n","<div class=\"code-container\">\n <fs-2fa-verification-code\n [method]=\"method\"\n [code]=\"code\"\n (codeChanged)=\"codeChanged.emit($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </fs-2fa-verification-code>\n</div>\n\n<div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n <a (click)=\"resend()\">\n Resend Code\n </a>\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </span>\n</div>","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { FsFormModule } from '@firestitch/form';\nimport { FsSkeletonModule } from '@firestitch/skeleton';\nimport { FsRadioGroupModule } from '@firestitch/radiogroup';\nimport { FsDialogModule } from '@firestitch/dialog';\n\nimport { CodeInputModule } from 'angular-code-input';\n\nimport { Fs2FAVerificationComponent } from './components/2fa-verification/2fa-verification.component';\nimport { Fs2FAVerificationCodeComponent } from './components/2fa-verification-code/2fa-verification-code.component';\nimport { Fs2FaVerificationMethodsComponent } from './components/2fa-verification-methods/2fa-verification-methods.component';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n\n MatFormFieldModule,\n MatInputModule,\n MatButtonModule,\n\n FsFormModule,\n FsRadioGroupModule,\n FsDialogModule,\n\n CodeInputModule,\n MatCheckboxModule,\n MatProgressSpinnerModule,\n FsSkeletonModule,\n FsSkeletonModule,\n MatIconModule,\n MatRadioModule,\n ],\n declarations: [\n Fs2FAVerificationComponent,\n Fs2FAVerificationCodeComponent,\n Fs2FaVerificationMethodsComponent,\n ],\n exports: [\n Fs2FAVerificationComponent,\n ],\n providers: [],\n})\nexport class Fs2FaModule {}\n","/*\n * Public API Surface of fs-2fa\n */\n\nexport { Fs2FaModule } from './app/fs-2fa.module';\n\n// Components\nexport { Fs2FAVerificationComponent } from './app/components/2fa-verification/2fa-verification.component';\n\nexport { IFsVerificationProvider } from './app/interfaces/verification-provider.interface';\nexport { IFsVerificationMethod } from './app/interfaces/verification-method.interface';\n\nexport { FsVerificationMethodType } from './app/enums/verification-method-type.enum';\n\nexport { FS_2FA_VERIFICATION_PROVIDER } from './app/tokens/verification.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAIa,4BAA4B,GAAG,IAAI,cAAc,CAC5D,mCAAmC;;ICLzB;AAAZ,WAAY,wBAAwB;IAClC,uCAAW,CAAA;IACX,2CAAe,CAAA;IACf,uCAAW,CAAA;AACb,CAAC,EAJW,wBAAwB,KAAxB,wBAAwB;;MCwBvB,iCAAiC;IAQ5C,YAEU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BATpB,0BAA0B;QAC1B,8BAA8B;QAC9B,iCAAiC,aAtBjC,YAAY;QACZ,WAAW;QAEX,kBAAkB;QAClB,cAAc;QACd,eAAe;QAEf,YAAY;QACZ,kBAAkB;QAClB,cAAc;QAEd,eAAe;QACf,iBAAiB;QACjB,wBAAwB;QACxB,gBAAgB;QAChB,gBAAgB;QAChB,aAAa;QACb,cAAc,aAQd,0BAA0B;0GAIjB,WAAW,aAFX,EAAE,YA5BJ;YACP,YAAY;YACZ,WAAW;YAEX,kBAAkB;YAClB,cAAc;YACd,eAAe;YAEf,YAAY;YACZ,kBAAkB;YAClB,cAAc;YAEd,eAAe;YACf,iBAAiB;YACjB,wBAAwB;YACxB,gBAAgB;YAChB,gBAAgB;YAChB,aAAa;YACb,cAAc;SACf;4FAWU,WAAW;kBA/BvB,QAAQ;mBAAC;oBACR,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBAEX,kBAAkB;wBAClB,cAAc;wBACd,eAAe;wBAEf,YAAY;wBACZ,kBAAkB;wBAClB,cAAc;wBAEd,eAAe;wBACf,iBAAiB;wBACjB,wBAAwB;wBACxB,gBAAgB;wBAChB,gBAAgB;wBAChB,aAAa;wBACb,cAAc;qBACf;oBACD,YAAY,EAAE;wBACZ,0BAA0B;wBAC1B,8BAA8B;wBAC9B,iCAAiC;qBAClC;oBACD,OAAO,EAAE;wBACP,0BAA0B;qBAC3B;oBACD,SAAS,EAAE,EAAE;iBACd;;;ACtDD;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"firestitch-2fa.js","sources":["../../src/app/tokens/verification.token.ts","../../src/app/enums/verification-method-type.enum.ts","../../src/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.ts","../../src/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.html","../../src/app/modules/code-input/components/code-input/code-input.component.ts","../../src/app/modules/code-input/components/code-input/code-input.component.html","../../src/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.ts","../../src/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.html","../../src/app/modules/verification/components/2fa-verification/2fa-verification.component.ts","../../src/app/modules/verification/components/2fa-verification/2fa-verification.component.html","../../src/app/modules/code-input/code-input.module.ts","../../src/app/modules/verification/fs-2fa-verification.module.ts","../../src/app/modules/manage/components/app/app.component.ts","../../src/app/modules/manage/components/app/app.component.html","../../src/app/modules/manage/components/email/email.component.ts","../../src/app/modules/manage/components/email/email.component.html","../../src/app/modules/manage/components/number/number.component.ts","../../src/app/modules/manage/components/number/number.component.html","../../src/app/modules/manage/services/two-factor-manage.service.ts","../../src/app/modules/manage/components/defaulted/defaulted.component.ts","../../src/app/modules/manage/components/defaulted/defaulted.component.html","../../src/app/modules/manage/components/verification-methods/verification-methods.component.ts","../../src/app/modules/manage/components/verification-methods/verification-methods.component.html","../../src/app/modules/manage/components/numbers/numbers.component.ts","../../src/app/modules/manage/components/numbers/numbers.component.html","../../src/app/modules/manage/components/emails/emails.component.ts","../../src/app/modules/manage/components/emails/emails.component.html","../../src/app/modules/manage/components/manage-methods/manage-methods.component.ts","../../src/app/modules/manage/components/manage-methods/manage-methods.component.html","../../src/app/modules/manage/components/2fa-manage/2fa-manage.component.ts","../../src/app/modules/manage/components/2fa-manage/2fa-manage.component.html","../../src/app/modules/manage/fs-2f-manage.module.ts","../../src/firestitch-2fa.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nimport { IFsVerificationProvider } from '../interfaces/verification-provider.interface';\n\nexport const FS_2FA_VERIFICATION_PROVIDER = new InjectionToken<IFsVerificationProvider>(\n 'Provider for Verification service',\n);\n","export enum FsVerificationMethodType {\n Sms = 'sms',\n Email = 'email',\n App = 'app',\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { Observable } from 'rxjs';\nimport { map, shareReplay, tap } from 'rxjs/operators';\n\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../../../tokens/verification.token';\nimport { FsVerificationMethodType } from '../../../../enums/verification-method-type.enum';\nimport { IFsVerificationProvider } from '../../../../interfaces/verification-provider.interface';\nimport { IFsVerificationMethod } from '../../../../interfaces/verification-method.interface';\n\n\n@Component({\n templateUrl: './2fa-verification-methods.component.html',\n styleUrls: [\n './2fa-verification-methods.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2faVerificationMethodsComponent {\n\n public method: IFsVerificationMethod;\n public phone: string;\n public code: string;\n public methods$: Observable<Record<string, IFsVerificationMethod[]>>;\n public readonly verificationMethodType = FsVerificationMethodType;\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n private _verificationProvider: IFsVerificationProvider,\n @Inject(MAT_DIALOG_DATA)\n private _dialogData: any,\n private _dialogRef: MatDialogRef<Fs2faVerificationMethodsComponent>,\n ) {\n this._setActiveMethod();\n this._initMethods();\n }\n\n public compareWith(o1, o2) {\n return o1 && o2 && o1.id === o2.id\n }\n\n public setVerificationMethod = () => {\n return this._verificationProvider\n .updateVerificationMethod(this.method.id)\n .pipe(\n tap((method: IFsVerificationMethod) => {\n this._dialogRef.close(method);\n })\n );\n };\n\n private _setActiveMethod(): void {\n this.method = this._dialogData?.method;\n }\n\n private _initMethods(): void {\n this.methods$ = this._verificationProvider\n .methods()\n .pipe(\n map((methods) => {\n return methods\n .reduce((acc, method) => {\n if (!acc[method.type]) {\n acc[method.type] = [];\n }\n\n acc[method.type].push(method);\n\n return acc;\n }, {});\n }),\n shareReplay(1),\n );\n }\n}\n","<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container *fsSkeleton=\"methods$ | async as methods\">\n <fs-radio-group [(ngModel)]=\"method\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of methods | keyvalue\">\n <div class=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n textsms\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Verification code send to one of following email\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n phone_iphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Authenticator App</div>\n <div class=\"method-subtitle\">\n Verification code generated by an authenticator app\n </div>\n </div>\n </div>\n </ng-container> \n </ng-container>\n\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n {{ method.phoneNumber }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n {{ method.email }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n Authenticator App\n </ng-container> \n </ng-container>\n </mat-radio-button>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <ng-container *ngIf=\"methods$ | async\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n </ng-container>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n","import { Component, ChangeDetectionStrategy, Output, EventEmitter, Input, ViewChild } from '@angular/core';\n\nimport { CodeInputComponent as AngularCodeInputComponent } from 'angular-code-input';\n\n\n@Component({\n selector: 'app-code-input',\n templateUrl: './code-input.component.html',\n styleUrls: ['./code-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CodeInputComponent {\n\n @ViewChild(AngularCodeInputComponent)\n public angularCodeInputComponent: AngularCodeInputComponent;\n\n @Input() public codeLength: number;\n @Input() public code;\n\n @Output() public codeCompleted = new EventEmitter();\n @Output() public codeChanged = new EventEmitter();\n \n public focus(): void {\n this.angularCodeInputComponent.focusOnField(0);\n }\n}","<code-input\r\n [initialFocusField]=\"0\"\r\n [codeLength]=\"6\"\r\n [code]=\"code\"\r\n (codeCompleted)=\"codeCompleted.emit($event)\"\r\n (codeChanged)=\"codeChanged.emit($event)\">\r\n</code-input>","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { ControlContainer, NgForm } from '@angular/forms';\nimport { CodeInputComponent } from '../../../../modules/code-input/components/code-input';\nimport { FsVerificationMethodType } from '../../../../enums/verification-method-type.enum';\n\nimport { IFsVerificationMethod } from '../../../../interfaces/verification-method.interface';\n\n\n@Component({\n selector: 'fs-2fa-verification-code',\n templateUrl: './2fa-verification-code.component.html',\n styleUrls: [\n './2fa-verification-code.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [\n {\n provide: ControlContainer,\n useExisting: NgForm,\n },\n ],\n})\nexport class Fs2faVerificationCodeComponent {\n\n @ViewChild(CodeInputComponent)\n public codeInputComponent: CodeInputComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Input()\n public code;\n\n @Output()\n public codeChanged = new EventEmitter<string>();\n\n @Output()\n public codeCompleted = new EventEmitter<void>();\n\n public FsVerificationMethodType = FsVerificationMethodType;\n\n public codeChange(code): void {\n this.code = code;\n this.codeChanged.emit(this.code);\n }\n\n public focus(): void {\n this.codeInputComponent.focus();\n }\n\n}\n","<ng-container *ngIf=\"method.phoneNumber && method.type === FsVerificationMethodType.Sms\">\n <p class=\"description\">\n A text message with a verification code was just\n sent to <span style=\"white-space: nowrap;\">{{ method.phoneNumber }}</span> to verify it's you.\n </p>\n\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.Email\">\n <p class=\"description\">\n A email with a verification code was just sent to {{ method.email }} to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.App\">\n <p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator app to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-template #input> \n <app-code-input \n [code]=\"code\"\n (codeChanged)=\"codeChange($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </app-code-input> \n</ng-template> ","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport { FsDialog } from '@firestitch/dialog';\n\nimport { filter, takeUntil, tap } from 'rxjs/operators';\n\nimport { IFsVerificationMethod } from '../../../../interfaces/verification-method.interface';\nimport { Fs2faVerificationMethodsComponent } from '../2fa-verification-methods/2fa-verification-methods.component';\nimport { Subject } from 'rxjs';\nimport { FS_2FA_VERIFICATION_PROVIDER } from '../../../../tokens/verification.token';\nimport { IFsVerificationProvider } from '../../../../interfaces/verification-provider.interface';\nimport { FsVerificationMethodType } from '../../../../enums/verification-method-type.enum';\nimport { Fs2faVerificationCodeComponent } from '../2fa-verification-code/2fa-verification-code.component';\n\n\n@Component({\n selector: 'fs-2fa-verification',\n templateUrl: './2fa-verification.component.html',\n styleUrls: [\n './2fa-verification.component.scss',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Fs2faVerificationComponent implements OnDestroy, AfterViewInit, OnInit {\n\n @ViewChild(Fs2faVerificationCodeComponent)\n public verificationCodeComponent: Fs2faVerificationCodeComponent;\n\n @Input()\n public method: IFsVerificationMethod;\n\n @Output()\n public verified = new EventEmitter<unknown>();\n\n @Output()\n public codeChanged = new EventEmitter<unknown>();\n\n @Output()\n public codeCompleted = new EventEmitter<unknown>();\n\n public resendInProgress = false;\n public code = '';\n public trustedDevice = true;\n public FsVerificationMethodType = FsVerificationMethodType;\n\n private _destroy$ = new Subject<void>();\n\n constructor(\n @Inject(FS_2FA_VERIFICATION_PROVIDER)\n public verificationProvider: IFsVerificationProvider,\n private _cdRef: ChangeDetectorRef,\n private _dialog: FsDialog,\n ) {\n }\n\n public ngOnInit(): void {\n this.codeChanged\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe((code: string) => {\n this.code = code;\n });\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public verify() {\n this.verificationProvider\n .verify(this.code, this.trustedDevice)\n .subscribe((response) => {\n this.verified.emit(response);\n });\n };\n\n public ngAfterViewInit(): void {\n this.verificationCodeComponent.focus(); \n }\n\n public resend(): void {\n this.resendInProgress = true;\n this.code = '';\n\n this.verificationProvider\n .resend()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.resendInProgress = false; \n this.verificationCodeComponent.focus(); \n this._cdRef.markForCheck();\n })\n }\n\n public showVerificationMethods(): void {\n this._dialog.open(\n Fs2faVerificationMethodsComponent,\n {\n data: {\n method: this.method,\n }\n }\n )\n .afterClosed()\n .pipe(\n filter((method) => !!method),\n )\n .subscribe((method) => {\n this.method = method;\n this.code = '';\n\n this._cdRef.markForCheck();\n\n setTimeout(() => {\n this.verificationCodeComponent.focus();\n });\n });\n }\n\n}\n","<div class=\"code-container\">\n <fs-2fa-verification-code\n [method]=\"method\"\n [code]=\"code\"\n (codeChanged)=\"codeChanged.emit($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </fs-2fa-verification-code>\n</div>\n\n<div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n <a (click)=\"resend()\">\n Resend Code\n </a>\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </span>\n</div>","import { NgModule } from '@angular/core';\n\nimport { CodeInputModule as AngularCodeInputModule } from 'angular-code-input';\n\nimport { CodeInputComponent } from './components/code-input';\n\n\n@NgModule({\n imports: [\n AngularCodeInputModule,\n ],\n declarations: [\n CodeInputComponent,\n ],\n exports: [\n CodeInputComponent,\n ],\n})\nexport class CodeInputModule {\n}\n","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { FsFormModule } from '@firestitch/form';\nimport { FsSkeletonModule } from '@firestitch/skeleton';\nimport { FsRadioGroupModule } from '@firestitch/radiogroup';\nimport { FsDialogModule } from '@firestitch/dialog';\n\nimport { Fs2faVerificationComponent } from './components/2fa-verification/2fa-verification.component';\nimport { Fs2faVerificationCodeComponent } from './components/2fa-verification-code/2fa-verification-code.component';\nimport { Fs2faVerificationMethodsComponent } from './components/2fa-verification-methods/2fa-verification-methods.component';\n\nimport { CodeInputModule } from '../code-input';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n\n MatFormFieldModule,\n MatInputModule,\n MatButtonModule,\n\n FsFormModule,\n FsRadioGroupModule,\n FsDialogModule,\n\n CodeInputModule,\n MatCheckboxModule,\n MatProgressSpinnerModule,\n FsSkeletonModule,\n FsSkeletonModule,\n MatIconModule,\n MatRadioModule,\n ],\n declarations: [\n Fs2faVerificationComponent,\n Fs2faVerificationCodeComponent,\n Fs2faVerificationMethodsComponent,\n ],\n exports: [\n Fs2faVerificationComponent,\n ],\n providers: [],\n})\nexport class Fs2faVerificationModule {}\n","import {\n Component, Inject, ChangeDetectionStrategy, ChangeDetectorRef, OnInit, ViewChild,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { FsFormDirective } from '@firestitch/form';\nimport { FsMessage } from '@firestitch/message';\n\nimport { tap } from 'rxjs/operators';\nimport { TwoFactorManageService } from '../../services';\n\n\n@Component({\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AppComponent implements OnInit {\n\n @ViewChild(FsFormDirective)\n public form: FsFormDirective;\n\n public twoFactorManageService: TwoFactorManageService;\n public mode: 'qr-code' | 'code-input' = 'qr-code';\n public accountId;\n public qrCodeUrl;\n public code;\n public default;\n public appType: 'google' | 'authy';\n\n constructor(\n @Inject(MAT_DIALOG_DATA) private _data: any,\n private _dialogRef: MatDialogRef<AppComponent>,\n private _cdRef: ChangeDetectorRef,\n private _message: FsMessage,\n ) {}\n\n public ngOnInit(): void {\n this.twoFactorManageService = this._data.twoFactorManageService;\n this.accountId = this._data.accountId;\n this.default = !this.twoFactorManageService.hasVerificationMethods;\n }\n\n public appTypeGoogle(): void {\n this.appTypeSelect('google');\n }\n\n public appTypeAuthy(): void {\n this.appTypeSelect('authy');\n }\n\n public appTypeSelect(appType): void {\n this.appType = appType;\n this.twoFactorManageService.verificationMethodCreate({\n type: 'app',\n default: this.default,\n })\n .subscribe((response) => {\n this.qrCodeUrl = response.qrCodeUrl;\n this._cdRef.markForCheck();\n });\n }\n\n public codeCompleted(): void {\n this.form.triggerSubmit();\n }\n\n public codeChanged(code): void {\n this.code = code;\n this.form.dirty();\n }\n\n public next(): void {\n this.mode = 'code-input';\n }\n\n public verify = () => {\n return this.twoFactorManageService.verificationMethodVerify(this.code)\n .pipe(\n tap(() => {\n this._message.success('Created app authenticator verification method');\n this._dialogRef.close(true);\n }),\n );\n };\n\n}\n","<form fsForm [submit]=\"verify\">\n <fs-dialog>\n <h1 mat-dialog-title>Authenticator App Setup</h1>\n <mat-dialog-content>\n\n <div *ngIf=\"mode === 'qr-code'\" class=\"qr-code\">\n <ng-container *ngIf=\"appType\">\n <ol>\n <li>\n <ng-container *ngIf=\"appType === 'authy'\">\n Install the Authy Authenticator App from the <a href=\"https://apps.apple.com/us/app/authy/id494168017\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.authy.authy\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n\n <ng-container *ngIf=\"appType === 'google'\">\n Install the Google Authenticator App from the <a href=\"https://apps.apple.com/us/app/google-authenticator/id388497605\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en_US&gl=US\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n </li>\n <ng-container *ngIf=\"appType === 'authy'\">\n <li>\n Open the Authy app and select <b>Add Account</b>.\n </li>\n <li>\n Select <b>Scan QR Code</b> and scan the QR code below.\n </li>\n </ng-container> \n <ng-container *ngIf=\"appType === 'google'\">\n <li>\n Open the Google Authentictor app and click the <b>Plus icon</b> in the lower right corner.\n </li>\n <li>\n Select <b>Scan a QR code</b> and scan the QR code below.\n </li>\n </ng-container>\n </ol>\n\n <qr-code \n *fsSkeleton=\"qrCodeUrl\"\n [value]=\"qrCodeUrl\"\n size=\"200\"\n errorCorrectionLevel=\"H\"\n [margin]=\"0\">\n </qr-code> \n </ng-container>\n\n <div class=\"app-types\" *ngIf=\"!appType\">\n <p>Select the Authenticator App you prefer</p>\n\n <div class=\"row\">\n <span>\n <a (click)=\"appTypeAuthy()\">\n <svg width=\"50\" height=\"50\" viewBox=\"0 0 256 256\" xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"xMidYMid\"><path d=\"M256 127.998C256 198.696 198.694 256 127.997 256 57.304 256 0 198.696 0 127.998 0 57.305 57.304 0 127.997 0 198.694 0 256 57.305 256 127.998z\" fill=\"#EC1C24\"/><path d=\"M117.024 100.89l30.691 30.68c4.43 4.436 11.623 4.436 16.064 0 4.431-4.435 4.441-11.622 0-16.058L133.086 84.82C111.125 62.854 75.631 62.5 53.204 83.704a9.536 9.536 0 0 0-.605.548c-.098.098-.178.202-.275.29-.1.096-.202.182-.297.278-.194.193-.371.396-.54.597-21.215 22.437-20.85 57.932 1.113 79.897L83.292 196c4.44 4.433 11.623 4.433 16.062 0 4.442-4.437 4.442-11.633.011-16.06l-30.693-30.691c-13.398-13.393-13.488-35.129-.278-48.637 13.506-13.21 35.23-13.114 48.63.279zm39.612-40.873c-4.435 4.437-4.435 11.623.012 16.059l30.681 30.693c13.39 13.392 13.477 35.125.268 48.636-13.51 13.2-35.227 13.112-48.623-.282l-30.692-30.689c-4.438-4.437-11.633-4.437-16.066 0-4.443 4.433-4.443 11.642 0 16.065l30.682 30.694c21.968 21.965 57.458 22.322 79.889 1.116.208-.184.404-.355.61-.549.094-.095.182-.192.273-.29.1-.095.197-.183.29-.289.197-.183.365-.384.54-.594 21.215-22.428 20.86-57.911-1.102-79.889l-30.692-30.682c-4.436-4.443-11.638-4.443-16.07.001z\" fill=\"#FFF\"/></svg>\n </a>\n Authy\n </span>\n \n <span>\n <a (click)=\"appTypeGoogle()\"> \n <svg width=\"50\" height=\"50\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m457.07 45.92c73.67-8.62 149.41.22 218.93 26.24 62.75 23.47 120.59 60.41 167.72 108.09-40.31 39.97-80.25 80.31-120.51 120.33-25.95-25.45-56.19-46.65-89.47-61.37-44.22-19.82-93.39-28.54-141.72-25.2-54.6 3.52-108.11 22.49-152.63 54.3-55.24 38.95-96.61 97.22-114.8 162.35-13.64 47.78-14.77 98.97-3.76 147.4 8.85 39.61 26.09 77.29 50.05 110.03 22.24 30.45 50.3 56.64 82.22 76.71 36.79 23.24 78.76 38.22 121.96 43.48 37.02 4.65 74.9 2.23 111.05-7 3.97-1.91 6.24 2.61 8.73 4.86 40.74 40.95 81.68 81.7 122.43 122.63-73.31 35.6-155.99 51.86-237.3 46.12-68.05-4.51-135.07-24.08-194.71-57.18-24.87-13.6-48.23-29.82-70.33-47.54-17.46-14.81-34.71-30.01-49.72-47.35-25.41-27.39-47.21-58.11-65.17-90.87-4-7.72-8.64-15.12-11.9-23.2-4.47-9.05-8.37-18.36-12.25-27.67-4.96-13.27-10.26-26.44-13.88-40.15-.43-1.81-1.53-3.33-2.52-4.85-8.3-28.66-12.95-58.33-15.44-88.04-2.62-37.36-1.33-75.05 4.78-112.03 12.18-75.48 43.41-147.74 89.86-208.44 30.12-39.5 66.53-74.21 107.46-102.35 62.44-43.11 135.53-70.69 210.92-79.3m49.18 50.48c-5.7.99-10.96 3.76-15.38 7.43-10.4 8.93-14.14 24.81-8.17 37.28 6.33 15.02 25.16 23.1 40.36 17 15.43-5.24 24.78-23.51 19.74-39.06-4.1-15.43-20.92-25.79-36.55-22.65m-267.96 111.99c-5.33.28-10.59 1.92-15.16 4.68-11.47 7.03-17.88 21.74-14.36 34.86 3.09 14.08 16.78 25.06 31.26 24.61 15.03.41 29.08-11.39 31.54-26.17 2.24-10.33-1.61-21.55-9.14-28.85-6.24-6.33-15.3-9.62-24.14-9.13m-115.96 272c-6.62 1.23-12.84 4.58-17.54 9.4-9.45 9.72-11.72 25.57-5.02 37.42 7.16 13.96 25.48 20.86 39.98 14.62 15.02-5.51 23.99-23.42 19.06-38.71-4.04-15.41-20.86-25.96-36.48-22.73m111.98 272.05c-11.49 1.95-21.48 10.72-24.84 21.88-3.87 11.63-.13 25.16 8.9 33.36 6.15 5.48 14.4 8.7 22.67 8.32 11.16-.25 21.98-6.87 27.12-16.8 4.93-8.83 5.15-20.02.71-29.1-5.82-12.78-20.81-20.33-34.56-17.66m272.06 112.03c-11.76 2.02-21.92 11.07-25.09 22.6-3.87 12.57 1.13 27.25 11.91 34.79 7.86 5.79 18.42 7.67 27.77 4.86 9.61-2.77 17.7-10.24 21.07-19.68 4.97-12.74.36-28.32-10.58-36.46-7.02-5.45-16.35-7.67-25.08-6.11z\" fill=\"#a0a0a0\"/>\n <g fill=\"#c1c1c1\">\n <path d=\"m506.25 96.4c15.63-3.14 32.45 7.22 36.55 22.65 5.04 15.55-4.31 33.82-19.74 39.06-15.2 6.1-34.03-1.98-40.36-17-5.97-12.47-2.23-28.35 8.17-37.28 4.42-3.67 9.68-6.44 15.38-7.43z\"/>\n <path d=\"m122.33 480.39c15.62-3.23 32.44 7.32 36.48 22.73 4.93 15.29-4.04 33.2-19.06 38.71-14.5 6.24-32.82-.66-39.98-14.62-6.7-11.85-4.43-27.7 5.02-37.42 4.7-4.82 10.92-8.17 17.54-9.4z\"/>\n </g>\n <path d=\"m843.72 180.25.11-.11c24.64 25.12 46.96 52.6 65.61 82.47 36.01 57.16 59.38 122.22 67.87 189.25 5.67 44.88 5.27 90.6-2.05 135.27-12.7 80.01-46.94 156.41-97.9 219.36-42.3 52.48-95.87 96.04-156.41 125.76l-.63-.26c-1.01-1.1-2.03-2.16-3.05-3.22-40.75-40.93-81.69-81.68-122.43-122.63-2.49-2.25-4.76-6.77-8.73-4.86-36.15 9.23-74.03 11.65-111.05 7-43.2-5.26-85.17-20.24-121.96-43.48-31.92-20.07-59.98-46.26-82.22-76.71-23.96-32.74-41.2-70.42-50.05-110.03-11.01-48.43-9.88-99.62 3.76-147.4 18.19-65.13 59.56-123.4 114.8-162.35 44.52-31.81 98.03-50.78 152.63-54.3 48.33-3.34 97.5 5.38 141.72 25.2 33.28 14.72 63.52 35.92 89.47 61.37 40.26-40.02 80.2-80.36 120.51-120.33m-351.75 183.97c-21.23 2.85-41.89 10.28-59.88 21.94-23.08 14.45-41.76 35.58-53.9 59.91-14.58 29.2-18.64 63.21-12.5 95.17 3.93 19.85 12.03 38.88 23.56 55.51 7.93 11.52 17.65 21.66 27.65 31.38 57.33 57.41 114.61 114.86 171.99 172.21 49.09-13.07 94.67-38.94 131.05-74.4 45.11-43.34 75.66-101.44 86.31-163.06.24-1.04.22-2.91 1.85-2.6 29.63.04 59.26-.01 88.9.05 19.04-.3 36.87-14.77 40.76-33.46.22-1.21 0-2.32-.67-3.35 1.22-5.71 2.08-11.58 1.38-17.43l-.24.4c-2.05-20.34-20.84-37.12-41.25-37.17-80.64-.07-161.28-.01-241.93-.07-6.44-22.08-18.5-42.33-34.03-59.23-25.8-27.5-62.26-45.01-100.02-46.82-9.68.02-19.44-.54-29.03 1.02m286.37 388.31c-12.64 2.06-23.37 12.59-25.7 25.18-1.48 8.14-.14 17.02 4.73 23.85 5.76 9.2 16.8 14.76 27.61 14.25 8.32.03 16.28-3.95 22.16-9.66 4.87-5.6 8.45-12.67 8.67-20.2.86-11.37-5.06-23.1-14.87-28.96-6.52-4.46-14.89-5.75-22.6-4.46z\" fill=\"#686868\"/>\n <path d=\"m238.29 208.39c8.84-.49 17.9 2.8 24.14 9.13 7.53 7.3 11.38 18.52 9.14 28.85-2.46 14.78-16.51 26.58-31.54 26.17-14.48.45-28.17-10.53-31.26-24.61-3.52-13.12 2.89-27.83 14.36-34.86 4.57-2.76 9.83-4.4 15.16-4.68z\" fill=\"#c3c3c3\"/>\n <path d=\"m491.97 364.22c9.59-1.56 19.35-1 29.03-1.02 37.76 1.81 74.22 19.32 100.02 46.82 15.53 16.9 27.59 37.15 34.03 59.23-47.67-.01-95.35-.01-143.03-.01-12.19-.11-24.23 5.42-32.21 14.61-6.01 6.85-9.74 15.65-10.44 24.74-1.19 14.17 5.36 28.7 16.69 37.28 7.62 5.91 17.28 9 26.92 8.8 126.69-.04 253.39-.06 380.08.03 4.76.04 9.59-.15 14.2-1.48 14.21-3.82 26.02-15.47 29.83-29.7.67 1.03.89 2.14.67 3.35-3.89 18.69-21.72 33.16-40.76 33.46-29.64-.06-59.27-.01-88.9-.05-1.63-.31-1.61 1.56-1.85 2.6-10.65 61.62-41.2 119.72-86.31 163.06-36.38 35.46-81.96 61.33-131.05 74.4-57.38-57.35-114.66-114.8-171.99-172.21-10-9.72-19.72-19.86-27.65-31.38-11.53-16.63-19.63-35.66-23.56-55.51-6.14-31.96-2.08-65.97 12.5-95.17 12.14-24.33 30.82-45.46 53.9-59.91 17.99-11.66 38.65-19.09 59.88-21.94z\" fill=\"#474747\"/>\n <g fill=\"#bfbfbf\">\n <path d=\"m479.81 483.85c7.98-9.19 20.02-14.72 32.21-14.61 47.68 0 95.36 0 143.03.01 80.65.06 161.29 0 241.93.07 20.41.05 39.2 16.83 41.25 37.17-.19.33-.58.97-.78 1.29-3.68-18.51-21.57-33.16-40.47-33.05-124.97.1-249.94.12-374.91.17-7.73.13-15.74-.8-23.15 1.96-9.06 2.84-16.73 9.1-22.27 16.7-3.34 4.55-4.39 10.24-7.28 15.03.7-9.09 4.43-17.89 10.44-24.74z\"/>\n <path d=\"m234.31 752.44c13.75-2.67 28.74 4.88 34.56 17.66 4.44 9.08 4.22 20.27-.71 29.1-5.14 9.93-15.96 16.55-27.12 16.8-8.27.38-16.52-2.84-22.67-8.32-9.03-8.2-12.77-21.73-8.9-33.36 3.36-11.16 13.35-19.93 24.84-21.88z\"/>\n </g>\n <path d=\"m498.92 476.86c7.41-2.76 15.42-1.83 23.15-1.96 124.97-.05 249.94-.07 374.91-.17 18.9-.11 36.79 14.54 40.47 33.05.2-.32.59-.96.78-1.29l.24-.4c.7 5.85-.16 11.72-1.38 17.43-3.81 14.23-15.62 25.88-29.83 29.7-4.61 1.33-9.44 1.52-14.2 1.48-126.69-.09-253.39-.07-380.08-.03-9.64.2-19.3-2.89-26.92-8.8-11.33-8.58-17.88-23.11-16.69-37.28 2.89-4.79 3.94-10.48 7.28-15.03 5.54-7.6 13.21-13.86 22.27-16.7z\" fill=\"#b0b0b0\"/>\n <path d=\"m59.49 636.08c.99 1.52 2.09 3.04 2.52 4.85 3.62 13.71 8.92 26.88 13.88 40.15 3.88 9.31 7.78 18.62 12.25 27.67 3.26 8.08 7.9 15.48 11.9 23.2 17.96 32.76 39.76 63.48 65.17 90.87 15.01 17.34 32.26 32.54 49.72 47.35 22.1 17.72 45.46 33.94 70.33 47.54 59.64 33.1 126.66 52.67 194.71 57.18 81.31 5.74 163.99-10.52 237.3-46.12 1.02 1.06 2.04 2.12 3.05 3.22l.03.61c-42.32 21.03-87.88 35.53-134.56 42.91-56.91 8.9-115.46 7.49-171.82-4.5-67.89-14.35-132.42-44.21-187.42-86.51-63.52-48.63-114.32-113.73-145.86-187.27-8.42-19.87-15.93-40.22-21.2-61.15z\" fill=\"#939393\"/>\n <path d=\"m778.34 752.53c7.71-1.29 16.08 0 22.6 4.46 9.81 5.86 15.73 17.59 14.87 28.96-.22 7.53-3.8 14.6-8.67 20.2-5.88 5.71-13.84 9.69-22.16 9.66-10.81.51-21.85-5.05-27.61-14.25-4.87-6.83-6.21-15.71-4.73-23.85 2.33-12.59 13.06-23.12 25.7-25.18z\" fill=\"#767676\"/>\n <path d=\"m506.37 864.47c8.73-1.56 18.06.66 25.08 6.11 10.94 8.14 15.55 23.72 10.58 36.46-3.37 9.44-11.46 16.91-21.07 19.68-9.35 2.81-19.91.93-27.77-4.86-10.78-7.54-15.78-22.22-11.91-34.79 3.17-11.53 13.33-20.58 25.09-22.6z\" fill=\"#bebebe\"/>\n </svg>\n </a>\n Google Authenticator\n </span>\n </div>\n\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default 2-step vertification method\n </mat-checkbox>\n </div>\n \n </div>\n\n <div *ngIf=\"mode === 'code-input'\" class=\"code-input\">\n <div>\n Enter the 6-digit code you see in the App.\n </div>\n\n <app-code-input\n [codeLength]=\"6\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\n </app-code-input>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <ng-container *ngIf=\"appType\">\n <button\n *ngIf=\"mode === 'qr-code'\"\n type=\"button\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Next\n </button>\n <button\n *ngIf=\"mode === 'code-input'\"\n type=\"submit\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Verify\n </button> \n </ng-container>\n <button\n type=\"button\"\n mat-button\n [mat-dialog-close]=\"null\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n","import {\n Component, Inject, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\n\nimport { FsMessage } from '@firestitch/message';\nimport { FsFormDirective } from '@firestitch/form';\n\nimport { of } from 'rxjs';\nimport { switchMap, tap } from 'rxjs/operators';\nimport { TwoFactorManageService } from '../../services';\n\n\n@Component({\n templateUrl: './email.component.html',\n styleUrls: ['./email.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EmailComponent {\n\n @ViewChild(FsFormDirective, { static: false })\n public form: FsFormDirective;\n\n public email;\n public code;\n public default;\n public verificationMethod = null;\n public twoFactorManageService: TwoFactorManageService;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) private _data: any,\n private _dialogRef: MatDialogRef<EmailComponent>,\n private _cdRef: ChangeDetectorRef,\n private _message: FsMessage,\n ) {\n this.twoFactorManageService = _data.twoFactorManageService;\n this.default = !this.twoFactorManageService.hasVerificationMethods;\n }\n\n public resend(): void {\n this.twoFactorManageService.verificationMethodResend()\n .subscribe(() => {\n this._message.success('Resent verification code');\n });\n }\n\n public submit = () => {\n return of(true)\n .pipe(\n switchMap(() => {\n return this.verificationMethod ?\n this.twoFactorManageService.verificationMethodVerify(this.code)\n .pipe(\n tap((verificationMethod) => {\n this._message.success('Created email verification method');\n this._dialogRef.close(verificationMethod);\n }),\n ) :\n this.twoFactorManageService.verificationMethodCreate({\n type: 'email',\n email: this.email,\n default: this.default,\n })\n .pipe(\n tap((verificationMethod) => {\n this.verificationMethod = verificationMethod;\n this.form.clear();\n this._cdRef.markForCheck();\n }),\n );\n }),\n );\n };\n\n public codeCompleted(): void {\n this.form.triggerSubmit();\n }\n\n public codeChanged(code): void {\n this.code = code;\n }\n\n}\n","<form fsForm [submit]=\"submit\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Email Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <p>The app just sent you an email with a verification code.</p>\n \n <app-code-input \n [code]=\"code\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\n </app-code-input> \n\n <div>Did't get the code? <a (click)=\"resend()\">Resend Code</a></div>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this email for verifying your account security. </p>\n <mat-form-field>\n <mat-label>Email</mat-label>\n <input\n matInput\n [required]=\"true\"\n [(ngModel)]=\"email\"\n name=\"email\">\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default 2-step vertification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n","import {\n Component, Inject, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { FsMessage } from '@firestitch/message';\nimport { FsFormDirective } from '@firestitch/form';\n\nimport { of } from 'rxjs';\nimport { switchMap, tap } from 'rxjs/operators';\nimport { TwoFactorManageService } from '../../services';\n\n\n@Component({\n templateUrl: './number.component.html',\n styleUrls: ['./number.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NumberComponent {\n\n @ViewChild(FsFormDirective, { static: false })\n public form: FsFormDirective;\n\n public phone;\n public code;\n public default;\n public verificationMethod = null;\n public defaultCountry;\n public twoFactorManageService: TwoFactorManageService;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) private _data: any,\n private _dialogRef: MatDialogRef<NumberComponent>,\n private _cdRef: ChangeDetectorRef,\n private _message: FsMessage,\n ) {\n this.twoFactorManageService = _data.twoFactorManageService;\n this.defaultCountry = _data.defaultCountry;\n this.default = !this.twoFactorManageService.hasVerificationMethods;\n }\n\n public resend(): void {\n this.twoFactorManageService.verificationMethodResend()\n .subscribe(() => {\n this._message.success('Resent verification code');\n });\n }\n\n public submit = () => {\n return of(true)\n .pipe(\n switchMap(() => {\n return this.verificationMethod ?\n this.twoFactorManageService.verificationMethodVerify(this.code)\n .pipe(\n tap((verificationMethod) => {\n this._message.success('Created text message verification method');\n this._dialogRef.close(verificationMethod);\n }),\n ) :\n this.twoFactorManageService.verificationMethodCreate({\n type: 'sms',\n phoneNumber: this.phone.number,\n phoneCode: this.phone.countryCode,\n phoneCountry: this.phone.isoCode,\n default: this.default,\n }).pipe(\n tap((verificationMethod) => {\n this.verificationMethod = verificationMethod;\n this.form.clear();\n this._cdRef.markForCheck();\n }),\n );\n }),\n );\n };\n\n public codeCompleted(): void {\n this.form.triggerSubmit();\n }\n\n public codeChanged(code): void {\n this.code = code;\n }\n\n}\n","<form fsForm [submit]=\"submit\" autocomplete=\"off\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Text Message Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <p>The app just sent you a text message with a verification code.</p>\n\n <app-code-input \n [code]=\"code\"\n (codeChanged)=\"codeChanged($event)\"\n (codeCompleted)=\"codeCompleted()\">\n </app-code-input> \n \n <div>Did't get the code? <a (click)=\"resend()\">Resend Code</a></div>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this number for verifying your account security. Message and data rates may apply by your cell phone provider.</p>\n <mat-form-field>\n <mat-label>Phone number</mat-label>\n <fs-phone-field\n [(ngModel)]=\"phone\"\n [country]=\"defaultCountry\"\n name=\"phone\"\n autocomplete=\"off\"\n [required]=\"true\">\n </fs-phone-field>\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default 2-step vertification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n","import { Injectable, OnDestroy } from '@angular/core';\n\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\nimport { switchMap, takeUntil, tap } from 'rxjs/operators';\n\nimport { AppComponent } from '../components/app';\nimport { EmailComponent } from '../components/email';\nimport { NumberComponent } from '../components/number';\n\n\n@Injectable()\nexport class TwoFactorManageService implements OnDestroy {\n\n private _destroy$ = new Subject();\n\n private _verificationMethodFetch: () => Observable<any[]>;\n private _verificationMethodCreate: (verificationMethod) => Observable<any>;\n private _verificationMethodDelete: (verificationMethod) => Observable<any>;\n private _verificationMethodVerify: (verificationMethod) => Observable<any>;\n private _verificationMethodResend: () => Observable<any>;\n private _accountVerify: () => Observable<any[]>;\n private _verificationMethods$ = new BehaviorSubject<any[]>([]);\n\n constructor(\n private _dialog: MatDialog,\n ) {}\n\n public get verificationMethods$() {\n return this._verificationMethods$\n .pipe(\n takeUntil(this._destroy$),\n );\n }\n \n public get verificationMethods() {\n return this._verificationMethods$.getValue();\n }\n\n public get hasVerificationMethods(): boolean {\n return !!this._verificationMethods$.getValue().length;\n }\n \n public getVerificationMethods(type) {\n return this.verificationMethods\n .filter((verificationMethod) => {\n return verificationMethod.type === type;\n });\n }\n \n public hasVerificationMethod(type) {\n return this.verificationMethods\n .some((verificationMethod) => {\n return verificationMethod.type === type;\n });\n }\n\n public registerVerificationMethodResend(value) {\n this._verificationMethodResend = value;\n }\n\n public registerVerificationMethodFetch(value) {\n this._verificationMethodFetch = value;\n }\n\n public registerVerificationMethodDelete(value) {\n this._verificationMethodDelete = value;\n }\n\n public registerVerificationMethodCreate(value) {\n this._verificationMethodCreate = value;\n }\n\n public registerVerificationMethodVerify(value) {\n this._verificationMethodVerify = value;\n }\n\n public registerAccountVerify(value) {\n this._accountVerify = value;\n }\n\n public verificationMethodDelete(verificationMethod): Observable<any> {\n return this._verificationMethodDelete(verificationMethod)\n .pipe(\n tap(() => {\n this.verificationMethodFetch();\n }),\n );\n }\n\n public verificationMethodVerify(verificationMethod): Observable<any> {\n return this._verificationMethodVerify(verificationMethod)\n .pipe(\n tap(() => {\n this.verificationMethodFetch();\n }),\n );\n }\n\n public verificationMethodCreate(verificationMethod): Observable<any> {\n return this._verificationMethodCreate(verificationMethod);\n }\n\n public verificationMethodResend(): Observable<any> {\n return this._verificationMethodResend();\n }\n\n public verificationMethodFetch() {\n this._verificationMethodFetch()\n .subscribe((verificationMethods) => {\n this._verificationMethods$.next(verificationMethods);\n });\n }\n\n public accountVerify(): Observable<any> {\n return this._accountVerify();\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public addSms(defaultCountry): Observable<any>{\n return this.accountVerify()\n .pipe(\n switchMap(() => this._dialog.open(NumberComponent, {\n data: {\n defaultCountry,\n twoFactorManageService: this,\n },\n })\n .afterClosed(),\n ),\n tap(() => {\n this.verificationMethodFetch();\n }),\n takeUntil(this._destroy$),\n );\n }\n\n public addEmail(): Observable<any>{\n return this.accountVerify()\n .pipe(\n switchMap(() => this._dialog.open(EmailComponent, {\n data: { twoFactorManageService: this },\n })\n .afterClosed(),\n ),\n tap(() => {\n this.verificationMethodFetch();\n }),\n takeUntil(this._destroy$),\n );\n }\n\n public addApp(): Observable<any>{\n return this.accountVerify()\n .pipe(\n switchMap(() => this._dialog.open(AppComponent, {\n data: { twoFactorManageService: this },\n })\n .afterClosed(),\n ),\n tap(() => {\n this.verificationMethodFetch();\n }),\n takeUntil(this._destroy$),\n );\n }\n}\n","import {\n Component, ChangeDetectionStrategy,\n} from '@angular/core';\n\n\n@Component({\n selector: 'app-defaulted',\n templateUrl: './defaulted.component.html',\n styleUrls: ['./defaulted.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DefaultedComponent {\n\n}\n","<span>Default</span>","import {\n Component, ChangeDetectionStrategy, OnInit, Input, Output, EventEmitter,\n} from '@angular/core';\n\nimport { FsListConfig } from '@firestitch/list';\nimport { FsPrompt } from '@firestitch/prompt';\nimport { IFsVerificationMethod } from '../../../../interfaces/verification-method.interface';\n\nimport { map, switchMap } from 'rxjs/operators';\nimport { TwoFactorManageService } from '../../services';\n\n\n@Component({\n selector: 'app-verification-methods',\n templateUrl: './verification-methods.component.html',\n styleUrls: ['./verification-methods.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class VerificationMethodsComponent implements OnInit {\n\n @Input() public twoFactorManageService: TwoFactorManageService;\n @Input() public type;\n \n @Output() public deleted = new EventEmitter<IFsVerificationMethod>();\n\n public listConfig: FsListConfig;\n public textMessageAdd: () => void;\n\n constructor(\n private _prompt: FsPrompt,\n ) {\n }\n\n public ngOnInit(): void {\n this.listConfig = {\n rowActions: [\n {\n click: (verificationMethod) => {\n this._prompt.confirm({\n title: 'Confirm',\n template: 'Would you like to delete this verification method?',\n })\n .pipe(\n switchMap(() => this.twoFactorManageService\n .verificationMethodDelete(verificationMethod)),\n )\n .subscribe(() => {\n this.deleted.emit(verificationMethod);\n });\n },\n label: 'Delete',\n },\n ],\n fetch: () => {\n return this.twoFactorManageService.verificationMethods$\n .pipe(\n map((verificationMethods) => ({\n data: verificationMethods.filter((verificationMethod) => {\n return verificationMethod.type === this.type;\n }),\n }),\n ),\n );\n },\n };\n }\n}\n","<fs-list [config]=\"listConfig\">\n <fs-list-column class=\"col-name\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"row\">\n <ng-container *ngIf=\"row.type === 'sms'\">\n <fs-country [code]=\"row.phoneCountry\" [showName]=\"false\"></fs-country> {{row.phoneNumber | fsPhone}}\n </ng-container>\n\n <ng-container *ngIf=\"row.type === 'email'\">\n {{row.email}}\n </ng-container>\n \n <app-defaulted *ngIf=\"row.default\"></app-defaulted>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>","import {\n Component, Inject, ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { FsMessage } from '@firestitch/message';\nimport { FsVerificationMethodType } from '../../../../enums/verification-method-type.enum';\nimport { TwoFactorManageService } from '../../services';\n\n\n@Component({\n templateUrl: './numbers.component.html',\n styleUrls: ['./numbers.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NumbersComponent {\n\n public defaultCountry;\n public twoFactorManageService: TwoFactorManageService;\n public FsVerificationMethodType = FsVerificationMethodType;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) private _data: any, \n private _dialogRef: MatDialogRef<NumbersComponent>,\n private _message: FsMessage,\n ) {\n this.twoFactorManageService = _data.twoFactorManageService;\n this.defaultCountry = _data.defaultCountry;\n }\n\n public add(): void {\n this.twoFactorManageService.addSms(this.defaultCountry)\n .subscribe();\n }\n\n public deleted(): void {\n this._message.success('Deleted text message verification method');\n if(!this.twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Sms)) {\n this._dialogRef.close();\n }\n }\n\n}\n","<fs-dialog>\n <h1 mat-dialog-title>\n Text Message Numbers\n </h1>\n <mat-dialog-content>\n <app-verification-methods\n [type]=\"FsVerificationMethodType.Sms\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </app-verification-methods>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Number\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n","import {\n Component, Inject, ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { FsMessage } from '@firestitch/message';\nimport { FsVerificationMethodType } from '../../../../enums/verification-method-type.enum';\nimport { TwoFactorManageService } from '../../services';\n\n\n@Component({\n templateUrl: './emails.component.html',\n styleUrls: ['./emails.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EmailsComponent {\n\n public twoFactorManageService: TwoFactorManageService;\n public FsVerificationMethodType = FsVerificationMethodType;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) private _data: any,\n private _dialogRef: MatDialogRef<EmailsComponent>,\n private _message: FsMessage,\n ) {\n this.twoFactorManageService = _data.twoFactorManageService;\n }\n\n public add(): void {\n this.twoFactorManageService.addEmail()\n .subscribe();\n }\n\n public deleted(): void {\n this._message.success('Deleted email verification method');\n if(!this.twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Email)) {\n this._dialogRef.close();\n }\n }\n\n}\n","<fs-dialog>\n <h1 mat-dialog-title>\n Emails\n </h1>\n <mat-dialog-content>\n <app-verification-methods\n [type]=\"FsVerificationMethodType.Email\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </app-verification-methods>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Email\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n","import {\n Component, Inject, ChangeDetectionStrategy, ChangeDetectorRef, OnInit, OnDestroy,\n} from '@angular/core';\n\nimport { MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';\n\nimport { Subject } from 'rxjs';\n\nimport { NumbersComponent } from '../numbers';\nimport { EmailsComponent } from '../emails';\nimport { TwoFactorManageService } from '../../services';\nimport { FsVerificationMethodType } from '../../../../enums/verification-method-type.enum';\nimport { FsMessage } from '@firestitch/message';\n\n\n@Component({\n templateUrl: './manage-methods.component.html',\n styleUrls: ['./manage-methods.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ManageMethodsComponent implements OnInit, OnDestroy {\n\n public verificationMethods;\n private _destroy$ = new Subject();\n private _defaultCountry: string;\n private _twoFactorManageService: TwoFactorManageService;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) private _data: any,\n private _cdRef: ChangeDetectorRef,\n private _dialog: MatDialog,\n private _message: FsMessage,\n ) {}\n\n public ngOnInit(): void {\n this._defaultCountry = this._data.defaultCountry;\n this._twoFactorManageService = this._data.twoFactorManageService;\n\n this._twoFactorManageService.verificationMethods$\n .subscribe((verificationMethods) => {\n this.verificationMethods = verificationMethods;\n this._cdRef.markForCheck();\n });\n }\n\n public get defaultSms(): boolean {\n return this._twoFactorManageService.getVerificationMethods(FsVerificationMethodType.Sms)\n .some((verificationMethod) => {\n return verificationMethod.default;\n });\n }\n\n public get defaultApp(): boolean {\n return this._twoFactorManageService.getVerificationMethods(FsVerificationMethodType.App)\n .some((verificationMethod) => {\n return verificationMethod.default;\n });\n }\n\n public get defaultEmail(): boolean {\n return this._twoFactorManageService.getVerificationMethods(FsVerificationMethodType.Email)\n .some((verificationMethod) => {\n return verificationMethod.default;\n });\n }\n\n public get textHasVerificationMethod(): boolean {\n return this._twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Sms);\n }\n\n public get appHasVerificationMethod(): boolean {\n return this._twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.App);\n }\n\n public get emailHasVerificationMethod(): boolean {\n return this._twoFactorManageService.hasVerificationMethod(FsVerificationMethodType.Email);\n }\n\n public textMessageManage(): void {\n this._dialog.open(NumbersComponent, {\n data: {\n twoFactorManageService: this._twoFactorManageService,\n defaultCountry: this._defaultCountry,\n },\n });\n }\n\n public textMessageAdd(): void {\n this._twoFactorManageService.addSms(this._defaultCountry)\n .subscribe();\n }\n\n public emailMessageManage(): void {\n this._dialog.open(EmailsComponent, {\n data: {\n twoFactorManageService: this._twoFactorManageService,\n },\n });\n }\n\n public emailMessageAdd(): void {\n this._twoFactorManageService.addEmail()\n .subscribe();\n }\n\n public appRemove(): void {\n this._message.success('Removed App Authenticator verification method');\n\n const verificationMethod = this.verificationMethods\n .find((_verificationMethod) => {\n return _verificationMethod.type === FsVerificationMethodType.App;\n });\n\n if(verificationMethod) {\n this._twoFactorManageService.verificationMethodDelete(verificationMethod)\n .subscribe(() => {\n this._cdRef.markForCheck();\n });\n }\n }\n\n public appAdd(): void {\n this._twoFactorManageService.addApp()\n .subscribe();\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n}\n","<fs-dialog>\n <h1 mat-dialog-title>2-Step Verification</h1>\n <mat-dialog-content>\n <table>\n <tr>\n <td>\n <mat-icon>textsms</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Text Message</span>\n <app-defaulted *ngIf=\"defaultSms\"></app-defaulted>\n </div>\n <div class=\"small\">Verification codes are sent by text message</div>\n </td>\n <td>\n <button \n *ngIf=\"textHasVerificationMethod; else textMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"textMessageManage()\">\n Manage\n </button>\n <ng-template #textMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"textMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr>\n <td>\n <mat-icon>email</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Email</span> \n <app-defaulted *ngIf=\"defaultEmail\"></app-defaulted>\n </div>\n <div class=\"small\">Verification codes are sent by email message</div>\n </td>\n <td>\n <button \n *ngIf=\"emailHasVerificationMethod; else emailMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"emailMessageManage()\">\n Manage\n </button>\n <ng-template #emailMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"emailMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr>\n <td>\n <mat-icon>phone_iphone</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Authenticator App</span>\n <app-defaulted *ngIf=\"defaultApp\"></app-defaulted>\n </div>\n <div class=\"small\">Verification code is generated by an authenticator app such as Authy or Google Authenticator</div>\n </td>\n <td>\n <button \n *ngIf=\"appHasVerificationMethod; else appMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"appRemove()\">\n Remove\n </button>\n <ng-template #appMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"appAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr> \n </table> \n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n","import {\n Component,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n OnDestroy,\n Input,\n OnInit,\n} from '@angular/core';\n\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { Observable, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { TwoFactorManageService } from '../../services';\n\nimport { ManageMethodsComponent } from '../manage-methods';\n\n\n@Component({\n selector: 'fs-2fa-manage',\n templateUrl: './2fa-manage.component.html',\n styleUrls: ['./2fa-manage.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TwoFactorManageService],\n})\nexport class Fs2faManageComponent implements OnDestroy, OnInit {\n\n @Input() public accountVerify: () => Observable<any>;\n @Input() public defaultCountry: string;\n @Input() public verificationMethodsFetch: () => Observable<any[]>;\n @Input() public verificationMethodDelete: (verificationMethod: any) => Observable<any>;\n @Input() public verificationMethodCreate: (verificationMethod: any) => Observable<any>;\n @Input() public verificationMethodVerify: (verificationMethod: any) => Observable<any>;\n @Input() public verificationMethodResend: () => Observable<any>;\n\n public statuses;\n\n private _destroy$ = new Subject();\n\n constructor(\n private _cdRef: ChangeDetectorRef,\n private _dialog: MatDialog,\n private _twoFactorManageService: TwoFactorManageService,\n ) {}\n\n public ngOnInit(): void {\n this._twoFactorManageService.registerVerificationMethodFetch(this.verificationMethodsFetch);\n this._twoFactorManageService.registerVerificationMethodDelete(this.verificationMethodDelete);\n this._twoFactorManageService.registerVerificationMethodCreate(this.verificationMethodCreate);\n this._twoFactorManageService.registerVerificationMethodVerify(this.verificationMethodVerify);\n this._twoFactorManageService.registerVerificationMethodResend(this.verificationMethodResend);\n this._twoFactorManageService.registerAccountVerify(this.accountVerify);\n\n\n this._twoFactorManageService.verificationMethods$\n .subscribe((verificationMethods) => {\n const types = {\n sms: 'Text Message',\n email: 'Email',\n app: 'Authenticator App',\n };\n\n this.statuses = Object.keys(\n verificationMethods.reduce((accum, verificationMethod) => {\n accum[verificationMethod.type] = true;\n\n return accum;\n }, {}),\n )\n .map((type) => {\n return types[type];\n });\n\n this._cdRef.markForCheck();\n });\n\n this._twoFactorManageService.verificationMethodFetch();\n }\n\n public manage() {\n const dialogRef = this._dialog.open(ManageMethodsComponent, {\n autoFocus: false,\n data: {\n defaultCountry: this.defaultCountry,\n twoFactorManageService: this._twoFactorManageService,\n },\n });\n\n dialogRef.afterClosed()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this._cdRef.markForCheck();\n });\n }\n\n public reload(): void {\n this._twoFactorManageService.verificationMethodFetch();\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n\n}\n","<fs-label-field>\n <fs-label>Status</fs-label>\n <ng-container *ngIf=\"statuses\">\n <ng-container *ngIf=\"statuses.length === 1\">\n {{statuses[0]}} verification is enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length > 1\">\n {{statuses.join(', ')}} verifications are enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length === 0\">\n No verification methods are enabled\n </ng-container>\n </ng-container>\n</fs-label-field>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\nimport { FsListModule } from '@firestitch/list';\nimport { FsDialogModule } from '@firestitch/dialog';\nimport { FsFormModule } from '@firestitch/form';\nimport { FsSkeletonModule } from '@firestitch/skeleton';\nimport { FsLabelModule } from '@firestitch/label';\nimport { FsPhoneModule } from '@firestitch/phone';\nimport { FsCountryModule } from '@firestitch/country';\n\nimport { QrCodeModule } from 'ng-qrcode';\n\n\nimport { CodeInputModule } from '../code-input';\nimport { Fs2faManageComponent } from './components/2fa-manage';\nimport { ManageMethodsComponent } from './components/manage-methods';\nimport { NumbersComponent } from './components/numbers';\nimport { AppComponent } from './components/app';\nimport { EmailComponent } from './components/email';\nimport { VerificationMethodsComponent } from './components/verification-methods';\nimport { NumberComponent } from './components/number';\nimport { EmailsComponent } from './components/emails';\nimport { DefaultedComponent } from './components/defaulted';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n\n MatButtonModule,\n MatDialogModule,\n MatInputModule,\n MatIconModule,\n MatCheckboxModule,\n\n FsDialogModule,\n FsListModule,\n FsFormModule,\n FsLabelModule,\n FsPhoneModule,\n FsSkeletonModule,\n FsCountryModule,\n\n CodeInputModule,\n\n QrCodeModule,\n ],\n declarations: [\n Fs2faManageComponent,\n ManageMethodsComponent,\n NumbersComponent,\n AppComponent,\n EmailComponent,\n VerificationMethodsComponent,\n NumberComponent,\n EmailsComponent,\n DefaultedComponent,\n ],\n exports: [Fs2faManageComponent],\n})\nexport class Fs2faManageModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["AngularCodeInputComponent","AngularCodeInputModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAIa,4BAA4B,GAAG,IAAI,cAAc,CAC5D,mCAAmC;;ICLzB;AAAZ,WAAY,wBAAwB;IAClC,uCAAW,CAAA;IACX,2CAAe,CAAA;IACf,uCAAW,CAAA;AACb,CAAC,EAJW,wBAAwB,KAAxB,wBAAwB;;MCwBvB,iCAAiC;IAQ5C,YAEU,qBAA8C,EAE9C,WAAgB,EAChB,UAA2D;QAH3D,0BAAqB,GAArB,qBAAqB,CAAyB;QAE9C,gBAAW,GAAX,WAAW,CAAK;QAChB,eAAU,GAAV,UAAU,CAAiD;QAPrD,2BAAsB,GAAG,wBAAwB,CAAC;QAiB3D,0BAAqB,GAAG;YAC7B,OAAO,IAAI,CAAC,qBAAqB;iBAC9B,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;iBACxC,IAAI,CACH,GAAG,CAAC,CAAC,MAA6B;gBAChC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;aAC/B,CAAC,CACH,CAAC;SACL,CAAC;QAhBA,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,YAAY,EAAE,CAAC;KACrB;IAEM,WAAW,CAAC,EAAE,EAAE,EAAE;QACvB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAA;KACnC;IAYO,gBAAgB;;QACtB,IAAI,CAAC,MAAM,GAAG,MAAA,IAAI,CAAC,WAAW,0CAAE,MAAM,CAAC;KACxC;IAEO,YAAY;QAClB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAA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QAC5B,eAAe;QACf,eAAe;QACf,kBAAkB,aA9BlB,YAAY;QACZ,WAAW;QAEX,eAAe;QACf,eAAe;QACf,cAAc;QACd,aAAa;QACb,iBAAiB;QAEjB,cAAc;QACd,YAAY;QACZ,YAAY;QACZ,aAAa;QACb,aAAa;QACb,gBAAgB;QAChB,eAAe;QAEf,eAAe;QAEf,YAAY,aAaJ,oBAAoB;gHAEnB,iBAAiB,YAnCnB;YACP,YAAY;YACZ,WAAW;YAEX,eAAe;YACf,eAAe;YACf,cAAc;YACd,aAAa;YACb,iBAAiB;YAEjB,cAAc;YACd,YAAY;YACZ,YAAY;YACZ,aAAa;YACb,aAAa;YACb,gBAAgB;YAChB,eAAe;YAEf,eAAe;YAEf,YAAY;SACb;4FAcU,iBAAiB;kBApC7B,QAAQ;mBAAC;oBACR,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBAEX,eAAe;wBACf,eAAe;wBACf,cAAc;wBACd,aAAa;wBACb,iBAAiB;wBAEjB,cAAc;wBACd,YAAY;wBACZ,YAAY;wBACZ,aAAa;wBACb,aAAa;wBACb,gBAAgB;wBAChB,eAAe;wBAEf,eAAe;wBAEf,YAAY;qBACb;oBACD,YAAY,EAAE;wBACZ,oBAAoB;wBACpB,sBAAsB;wBACtB,gBAAgB;wBAChB,YAAY;wBACZ,cAAc;wBACd,4BAA4B;wBAC5B,eAAe;wBACf,eAAe;wBACf,kBAAkB;qBACnB;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;iBAChC;;;ACpED;;;;;;"}
|
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { Fs2faVerificationModule } from './app/modules/verification/fs-2fa-verification.module';
|
|
2
|
+
export { Fs2faManageModule } from './app/modules/manage/fs-2f-manage.module';
|
|
3
|
+
export { Fs2faVerificationComponent } from './app/modules/verification/components/2fa-verification/2fa-verification.component';
|
|
4
|
+
export { Fs2faManageComponent } from './app/modules/manage/components/2fa-manage/2fa-manage.component';
|
|
3
5
|
export { IFsVerificationProvider } from './app/interfaces/verification-provider.interface';
|
|
4
6
|
export { IFsVerificationMethod } from './app/interfaces/verification-method.interface';
|
|
5
7
|
export { FsVerificationMethodType } from './app/enums/verification-method-type.enum';
|
package/app/fs-2fa.module.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./components/2fa-verification/2fa-verification.component";
|
|
3
|
-
import * as i2 from "./components/2fa-verification-code/2fa-verification-code.component";
|
|
4
|
-
import * as i3 from "./components/2fa-verification-methods/2fa-verification-methods.component";
|
|
5
|
-
import * as i4 from "@angular/common";
|
|
6
|
-
import * as i5 from "@angular/forms";
|
|
7
|
-
import * as i6 from "@angular/material/form-field";
|
|
8
|
-
import * as i7 from "@angular/material/input";
|
|
9
|
-
import * as i8 from "@angular/material/button";
|
|
10
|
-
import * as i9 from "@firestitch/form";
|
|
11
|
-
import * as i10 from "@firestitch/radiogroup";
|
|
12
|
-
import * as i11 from "@firestitch/dialog";
|
|
13
|
-
import * as i12 from "angular-code-input";
|
|
14
|
-
import * as i13 from "@angular/material/checkbox";
|
|
15
|
-
import * as i14 from "@angular/material/progress-spinner";
|
|
16
|
-
import * as i15 from "@firestitch/skeleton";
|
|
17
|
-
import * as i16 from "@angular/material/icon";
|
|
18
|
-
import * as i17 from "@angular/material/radio";
|
|
19
|
-
export declare class Fs2FaModule {
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Fs2FaModule, never>;
|
|
21
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<Fs2FaModule, [typeof i1.Fs2FAVerificationComponent, typeof i2.Fs2FAVerificationCodeComponent, typeof i3.Fs2FaVerificationMethodsComponent], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i6.MatFormFieldModule, typeof i7.MatInputModule, typeof i8.MatButtonModule, typeof i9.FsFormModule, typeof i10.FsRadioGroupModule, typeof i11.FsDialogModule, typeof i12.CodeInputModule, typeof i13.MatCheckboxModule, typeof i14.MatProgressSpinnerModule, typeof i15.FsSkeletonModule, typeof i15.FsSkeletonModule, typeof i16.MatIconModule, typeof i17.MatRadioModule], [typeof i1.Fs2FAVerificationComponent]>;
|
|
22
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<Fs2FaModule>;
|
|
23
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Inject, Input, Output, ViewChild, } from '@angular/core';
|
|
2
|
-
import { FsDialog } from '@firestitch/dialog';
|
|
3
|
-
import { filter, takeUntil, tap } from 'rxjs/operators';
|
|
4
|
-
import { Fs2FaVerificationMethodsComponent } from '../2fa-verification-methods/2fa-verification-methods.component';
|
|
5
|
-
import { Subject } from 'rxjs';
|
|
6
|
-
import { FS_2FA_VERIFICATION_PROVIDER } from '../../tokens/verification.token';
|
|
7
|
-
import { FsVerificationMethodType } from '../../enums/verification-method-type.enum';
|
|
8
|
-
import { Fs2FAVerificationCodeComponent } from '../2fa-verification-code/2fa-verification-code.component';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
import * as i1 from "@firestitch/dialog";
|
|
11
|
-
import * as i2 from "../2fa-verification-code/2fa-verification-code.component";
|
|
12
|
-
import * as i3 from "@angular/material/checkbox";
|
|
13
|
-
import * as i4 from "@angular/material/progress-spinner";
|
|
14
|
-
import * as i5 from "@angular/forms";
|
|
15
|
-
import * as i6 from "@angular/common";
|
|
16
|
-
export class Fs2FAVerificationComponent {
|
|
17
|
-
constructor(verificationProvider, _cdRef, _dialog) {
|
|
18
|
-
this.verificationProvider = verificationProvider;
|
|
19
|
-
this._cdRef = _cdRef;
|
|
20
|
-
this._dialog = _dialog;
|
|
21
|
-
this.verified = new EventEmitter();
|
|
22
|
-
this.codeChanged = new EventEmitter();
|
|
23
|
-
this.codeCompleted = new EventEmitter();
|
|
24
|
-
this.resendInProgress = false;
|
|
25
|
-
this.code = '';
|
|
26
|
-
this.trustedDevice = true;
|
|
27
|
-
this.FsVerificationMethodType = FsVerificationMethodType;
|
|
28
|
-
this._destroy$ = new Subject();
|
|
29
|
-
this.verify = () => {
|
|
30
|
-
return this.verificationProvider
|
|
31
|
-
.verify(this.code, this.trustedDevice)
|
|
32
|
-
.pipe(tap((response) => {
|
|
33
|
-
this.verified.emit(response);
|
|
34
|
-
}));
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
ngOnInit() {
|
|
38
|
-
this.codeChanged
|
|
39
|
-
.pipe(takeUntil(this._destroy$))
|
|
40
|
-
.subscribe((code) => {
|
|
41
|
-
this.code = code;
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
ngOnDestroy() {
|
|
45
|
-
this._destroy$.next();
|
|
46
|
-
this._destroy$.complete();
|
|
47
|
-
}
|
|
48
|
-
ngAfterViewInit() {
|
|
49
|
-
this.verificationCodeComponent.focus();
|
|
50
|
-
}
|
|
51
|
-
resend() {
|
|
52
|
-
this.resendInProgress = true;
|
|
53
|
-
this.code = '';
|
|
54
|
-
this.verificationProvider
|
|
55
|
-
.resend()
|
|
56
|
-
.pipe(takeUntil(this._destroy$))
|
|
57
|
-
.subscribe(() => {
|
|
58
|
-
this.resendInProgress = false;
|
|
59
|
-
this._cdRef.markForCheck();
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
showVerificationMethods() {
|
|
63
|
-
this._dialog.open(Fs2FaVerificationMethodsComponent, {
|
|
64
|
-
data: {
|
|
65
|
-
method: this.method,
|
|
66
|
-
}
|
|
67
|
-
})
|
|
68
|
-
.afterClosed()
|
|
69
|
-
.pipe(filter((method) => !!method))
|
|
70
|
-
.subscribe((method) => {
|
|
71
|
-
this.method = method;
|
|
72
|
-
this.code = '';
|
|
73
|
-
this._cdRef.markForCheck();
|
|
74
|
-
setTimeout(() => {
|
|
75
|
-
this.verificationCodeComponent.focus();
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
Fs2FAVerificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationComponent, deps: [{ token: FS_2FA_VERIFICATION_PROVIDER }, { token: i0.ChangeDetectorRef }, { token: i1.FsDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
81
|
-
Fs2FAVerificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationComponent, selector: "fs-2fa-verification", inputs: { method: "method" }, outputs: { verified: "verified", codeChanged: "codeChanged", codeCompleted: "codeCompleted" }, viewQueries: [{ propertyName: "verificationCodeComponent", first: true, predicate: Fs2FAVerificationCodeComponent, descendants: true }], ngImport: i0, template: "<div class=\"code-container\">\n <fs-2fa-verification-code\n [method]=\"method\"\n [code]=\"code\"\n (codeChanged)=\"codeChanged.emit($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </fs-2fa-verification-code>\n</div>\n\n<div class=\"additional\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustedDevice\">\n Trust this device\n </mat-checkbox>\n\n <span class=\"resend-code-btn\">\n <ng-container *ngIf=\"!resendInProgress else sending\">\n <a (click)=\"resend()\">\n Resend Code\n </a>\n </ng-container>\n <ng-template #sending>\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </ng-template>\n </span>\n</div>", styles: [".code-container{text-align:center}.additional{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px}.additional .resend-code-btn{cursor:pointer;text-transform:none}.additional .resend-code-btn mat-spinner{display:inline-block;vertical-align:middle}\n"], components: [{ type: i2.Fs2FAVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: ["method", "code"], outputs: ["codeChanged", "codeCompleted"] }, { type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i4.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
82
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationComponent, decorators: [{
|
|
83
|
-
type: Component,
|
|
84
|
-
args: [{
|
|
85
|
-
selector: 'fs-2fa-verification',
|
|
86
|
-
templateUrl: './2fa-verification.component.html',
|
|
87
|
-
styleUrls: [
|
|
88
|
-
'./2fa-verification.component.scss',
|
|
89
|
-
],
|
|
90
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
91
|
-
}]
|
|
92
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
93
|
-
type: Inject,
|
|
94
|
-
args: [FS_2FA_VERIFICATION_PROVIDER]
|
|
95
|
-
}] }, { type: i0.ChangeDetectorRef }, { type: i1.FsDialog }]; }, propDecorators: { verificationCodeComponent: [{
|
|
96
|
-
type: ViewChild,
|
|
97
|
-
args: [Fs2FAVerificationCodeComponent]
|
|
98
|
-
}], method: [{
|
|
99
|
-
type: Input
|
|
100
|
-
}], verified: [{
|
|
101
|
-
type: Output
|
|
102
|
-
}], codeChanged: [{
|
|
103
|
-
type: Output
|
|
104
|
-
}], codeCompleted: [{
|
|
105
|
-
type: Output
|
|
106
|
-
}] } });
|
|
107
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLC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b2RlLWNvbnRhaW5lclwiPlxuICA8ZnMtMmZhLXZlcmlmaWNhdGlvbi1jb2RlXG4gICAgW21ldGhvZF09XCJtZXRob2RcIlxuICAgIFtjb2RlXT1cImNvZGVcIlxuICAgIChjb2RlQ2hhbmdlZCk9XCJjb2RlQ2hhbmdlZC5lbWl0KCRldmVudClcIlxuICAgIChjb2RlQ29tcGxldGVkKT1cImNvZGVDb21wbGV0ZWQuZW1pdCgpXCI+XG4gIDwvZnMtMmZhLXZlcmlmaWNhdGlvbi1jb2RlPlxuPC9kaXY+XG5cbjxkaXYgY2xhc3M9XCJhZGRpdGlvbmFsXCI+XG4gIDxtYXQtY2hlY2tib3hcbiAgICBuYW1lPVwidHJ1c3QtZGV2aWNlXCJcbiAgICBbKG5nTW9kZWwpXT1cInRydXN0ZWREZXZpY2VcIj5cbiAgICBUcnVzdCB0aGlzIGRldmljZVxuICA8L21hdC1jaGVja2JveD5cblxuICA8c3BhbiBjbGFzcz1cInJlc2VuZC1jb2RlLWJ0blwiPlxuICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCIhcmVzZW5kSW5Qcm9ncmVzcyBlbHNlIHNlbmRpbmdcIj5cbiAgICAgIDxhIChjbGljayk9XCJyZXNlbmQoKVwiPlxuICAgICAgICBSZXNlbmQgQ29kZVxuICAgICAgPC9hPlxuICAgIDwvbmctY29udGFpbmVyPlxuICAgIDxuZy10ZW1wbGF0ZSAjc2VuZGluZz5cbiAgICAgIDxtYXQtc3Bpbm5lciBbZGlhbWV0ZXJdPVwiMTJcIj48L21hdC1zcGlubmVyPiBTZW5kaW5nXG4gICAgPC9uZy10ZW1wbGF0ZT5cbiAgPC9zcGFuPlxuPC9kaXY+Il19
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewChild, } from '@angular/core';
|
|
2
|
-
import { ControlContainer, NgForm } from '@angular/forms';
|
|
3
|
-
import { CodeInputComponent } from 'angular-code-input';
|
|
4
|
-
import { FsVerificationMethodType } from '../../enums/verification-method-type.enum';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "angular-code-input";
|
|
7
|
-
import * as i2 from "@angular/common";
|
|
8
|
-
export class Fs2FAVerificationCodeComponent {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.codeChanged = new EventEmitter();
|
|
11
|
-
this.codeCompleted = new EventEmitter();
|
|
12
|
-
this.FsVerificationMethodType = FsVerificationMethodType;
|
|
13
|
-
}
|
|
14
|
-
codeChange(code) {
|
|
15
|
-
this.code = code;
|
|
16
|
-
this.codeChanged.emit(this.code);
|
|
17
|
-
}
|
|
18
|
-
focus() {
|
|
19
|
-
this.codeInputComponent.focusOnField(0);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
Fs2FAVerificationCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
-
Fs2FAVerificationCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2FAVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: { method: "method", code: "code" }, outputs: { codeChanged: "codeChanged", codeCompleted: "codeCompleted" }, viewQueries: [{ propertyName: "codeInputComponent", first: true, predicate: CodeInputComponent, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"method.phoneNumber && method.type === FsVerificationMethodType.Sms\">\n <p class=\"description\">\n A text message with a verification code was just\n sent to <span style=\"white-space: nowrap;\">{{ method.phoneNumber }}</span> to verify it's you.\n </p>\n\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.Email\">\n <p class=\"description\">\n A email with a verification code was just sent to {{ method.email }} to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"method.type === FsVerificationMethodType.App\">\n <p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator app to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n\n<ng-template #input> \n <code-input \n [code]=\"code\"\n [initialFocusField]=\"0\"\n [codeLength]=\"6\"\n (codeChanged)=\"codeChange($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </code-input> \n</ng-template> ", styles: ["mat-form-field{width:100%}mat-form-field ::ng-deep .mat-form-field-subscript-wrapper{min-height:unset!important}mat-form-field ::ng-deep .mat-form-field-subscript-wrapper .fs-form-error{padding-bottom:5px}code-input{margin-bottom:5px;--item-spacing: 10px;--item-height: 20px;--item-border: none;--item-border-bottom: 2px solid #949494;--item-border-has-value: none;--item-border-bottom-has-value: 2px solid #949494;--item-border-focused: none;--item-border-bottom-focused: 2px solid #0061AF;--item-shadow-focused: none;--item-border-radius: 0px}code-input ::ng-deep span:first-child{padding-left:0!important}code-input ::ng-deep span:last-child{padding-right:0!important}code-input ::ng-deep input{font-size:20px!important;height:40px!important;padding:0!important}\n"], components: [{ type: i1.CodeInputComponent, selector: "code-input", inputs: ["isNonDigitsCode", "codeLength", "inputType", "initialFocusField", "isCharsCode", "isCodeHidden", "isPrevFocusableAfterClearing", "isFocusingOnLastByClickIfFilled", "code", "disabled", "autocapitalize"], outputs: ["codeChanged", "codeCompleted"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], viewProviders: [
|
|
24
|
-
{
|
|
25
|
-
provide: ControlContainer,
|
|
26
|
-
useExisting: NgForm,
|
|
27
|
-
},
|
|
28
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Fs2FAVerificationCodeComponent, decorators: [{
|
|
30
|
-
type: Component,
|
|
31
|
-
args: [{
|
|
32
|
-
selector: 'fs-2fa-verification-code',
|
|
33
|
-
templateUrl: './2fa-verification-code.component.html',
|
|
34
|
-
styleUrls: [
|
|
35
|
-
'./2fa-verification-code.component.scss',
|
|
36
|
-
],
|
|
37
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
38
|
-
viewProviders: [
|
|
39
|
-
{
|
|
40
|
-
provide: ControlContainer,
|
|
41
|
-
useExisting: NgForm,
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
}]
|
|
45
|
-
}], propDecorators: { codeInputComponent: [{
|
|
46
|
-
type: ViewChild,
|
|
47
|
-
args: [CodeInputComponent]
|
|
48
|
-
}], method: [{
|
|
49
|
-
type: Input
|
|
50
|
-
}], code: [{
|
|
51
|
-
type: Input
|
|
52
|
-
}], codeChanged: [{
|
|
53
|
-
type: Output
|
|
54
|
-
}], codeCompleted: [{
|
|
55
|
-
type: Output
|
|
56
|
-
}] } });
|
|
57
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMmZhLXZlcmlmaWNhdGlvbi1jb2RlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy8yZmEtdmVyaWZpY2F0aW9uLWNvZGUvMmZhLXZlcmlmaWNhdGlvbi1jb2RlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy8yZmEtdmVyaWZpY2F0aW9uLWNvZGUvMmZhLXZlcmlmaWNhdGlvbi1jb2RlLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCx1QkFBdUIsRUFDdkIsU0FBUyxFQUNULFlBQVksRUFDW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