New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PM- 2059 Update Two factor webauthn dialog #9009
base: main
Are you sure you want to change the base?
PM- 2059 Update Two factor webauthn dialog #9009
Conversation
…059-update-two-factor-webauthn-dialog
@rr-bw When I click the read key button , it is not opening the windows authentication using PIN like in QA vault. That may be due to that im running using local host. Because I get the following err .. This error is due to the rp value in publicKeyCredentials passed to navigator. So I think this will work in qa vault |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9009 +/- ##
=======================================
Coverage 28.14% 28.15%
=======================================
Files 2372 2372
Lines 70074 70085 +11
Branches 13149 13150 +1
=======================================
+ Hits 19722 19732 +10
Misses 48788 48788
- Partials 1564 1565 +1 ☔ View full report in Codecov by Sentry. |
Fixed Issues
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…059-update-two-factor-webauthn-dialog
…059-update-two-factor-webauthn-dialog
@rr-bw Actually the issue is when we give name in the name input field , it should read key. Since we already have issue in reading key in local host , webAuthnResponse is null. And actual workflow is if webAuthnResponse is null Save button should be disabled. It should not be enabled and user is unable to click. But here even if the webAuthnResponse is null save is getting enabled. Yes please help me in debugging. |
@rr-bw Please advise on the above |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't let me comment on the specific line, but line 39 of the html file needs updated to tw-text-muted
.
webAuthnComp.auth(result); | ||
webAuthnComp.onUpdated.pipe(takeUntil(this.destroy$)).subscribe((enabled: boolean) => { | ||
this.updateStatus(enabled, TwoFactorProviderType.WebAuthn); | ||
webAuthnComp.componentInstance.onChangeStatus.subscribe((enabled: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be enabled: boolean
?
webAuthnComp.onUpdated.pipe(takeUntil(this.destroy$)).subscribe((enabled: boolean) => { | ||
this.updateStatus(enabled, TwoFactorProviderType.WebAuthn); | ||
webAuthnComp.componentInstance.onChangeStatus.subscribe((enabled: any) => { | ||
this.updateStatus(enabled, TwoFactorProviderType.Authenticator); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TwoFactorProviderType.WebAuthn
, not Authenticator.
@@ -31,6 +33,7 @@ interface Key { | |||
templateUrl: "two-factor-webauthn.component.html", | |||
}) | |||
export class TwoFactorWebAuthnComponent extends TwoFactorBaseComponent { | |||
@Output() onChangeStatus = new EventEmitter<boolean>(); | |||
type = TwoFactorProviderType.WebAuthn; | |||
name: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do will still need name
? Where do we access this property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rr-bw Yes this is used in setup component , to immediately send enabled status to set up component , the enabled tick mark should appear before we close the dialog . so we are using this event emitter.
constructor( | ||
@Inject(DIALOG_DATA) protected data: AuthResponse<TwoFactorWebAuthnResponse>, | ||
private dialogRef: DialogRef, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is private dialogRef: DialogRef
injection needed? I don't see where we are reading it.
<li>{{ "twoFactorWebAuthnSupportWeb" | i18n }}</li> | ||
</ul> | ||
</app-callout> | ||
<img class="tw-float-right tw-ml-5 mfaType7" alt="FIDO2 WebAuthn logo'" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove the trailing single quote '
in the string?
<p *ngIf="!k.configured || !k.name" bitTypography="body1" class="tw-font-bold"> | ||
{{ "webAuthnkeyX" | i18n: i + 1 }} | ||
</p> | ||
<p *ngIf="k.configured && k.name" bitTypography="body1" class="tw-font-bold"> | ||
{{ k.name }} | ||
</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<li>{{ "twoFactorU2fTouchButton" | i18n }}</li> | ||
<li>{{ "twoFactorU2fSaveForm" | i18n }}</li> | ||
</ol> | ||
<div class="tw-flex tw-flex-row"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think tw-flex-row
is unnecessary because it is the default.
</div> | ||
<button | ||
bitButton | ||
bitFornButton |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: bitFormButton
{{ "save" | i18n }} | ||
</button> | ||
<button | ||
#disableBtn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we are using this #disableBtn
templateRef anymore.
@jlf0dev or @JaredSnider-Bitwarden Would either of you have capacity to help in debugging this? I can't seem to track down the issue. The "save" button is somehow getting enabled when you simply start typing in the name field. It's supposed to remain disabled as long as |
…059-update-two-factor-webauthn-dialog
Type of change
Objective
Update Two factor webauthn dialog component to use the component library
Code changes
Screenshots
Two-step.login._Webauth_.Bitwarden.Web.vault.-.Google.Chrome.2024-05-02.13-42-28.mp4