clients icon indicating copy to clipboard operation
clients copied to clipboard

[SG-168] Passwordless login web MVP

Open gbubemismith opened this issue 3 years ago • 2 comments

Type of change

- [ ] Bug fix
- [X] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Code changes

New feature which adds passwordless login initiation to the web. Also, the the login page was updated to use reactive forms.

  • libs/common/src/services/auth.service.ts: Added Passwordless authetication type. pushNotificationSubject observable was created to react to response from the server and communicate that response with the login-with-device-component.
  • libs/common/src/services/api.service.ts: Added post auth request and get auth response http calls.
  • libs/common/src/services/anonymousHub.service.ts: Service to create and stop signalR connection for the passwordless auth response.
  • libs/angular/src/components/login.component.ts: Refactored login component to use reactive forms.
  • apps/browser/src/popup/accounts/login.component.ts: Refactored browser login component to use reactive forms.
  • apps/desktop/src/app/accounts/login.component.html: Refactored desktop login component to use reactive forms.

Screenshots

https://user-images.githubusercontent.com/13024008/187772981-3ab75263-001b-45a2-bf95-a9e9d7a75da4.mov

Before you submit

  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

gbubemismith avatar Aug 31 '22 20:08 gbubemismith

I noticed we're using untyped form builder in this PR, please don't do that. While we do use it in other places that's because typed forms are a new addition to Angular, but the old places are tech debt.

Hinton avatar Sep 01 '22 08:09 Hinton

I noticed we're using untyped form builder in this PR, please don't do that. While we do use it in other places that's because typed forms are a new addition to Angular, but the old places are tech debt.

I missed this @Hinton. I would revert this.

gbubemismith avatar Sep 12 '22 17:09 gbubemismith

Also, for documentation purposes, Codescene is failing here because we added a new notification type and those all run through a lot of shared code that grows with each notification. There is a tech debt item on the backlog to refactor the way we handle notifications.

addisonbeck avatar Sep 23 '22 18:09 addisonbeck

@gbubemismith What about adding the feature flag to either the base.json or the qa.json and the selfHosted.json? I'm worried it will error when it tries to look at the value in qa or selfhosted and doesn't see it

differsthecat avatar Sep 26 '22 20:09 differsthecat

it will error when it tries to look at the value in qa or selfhosted and doesn't see i

Okay, that makes sense.

gbubemismith avatar Sep 26 '22 20:09 gbubemismith