[SG-168] Passwordless login web MVP
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
Passwordlessauthetication type.pushNotificationSubjectobservable was created to react to response from the server and communicate that response with thelogin-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
logincomponent to use reactive forms. - apps/browser/src/popup/accounts/login.component.ts: Refactored browser
logincomponent to use reactive forms. - apps/desktop/src/app/accounts/login.component.html: Refactored desktop
logincomponent 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
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 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.
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.
@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
it will error when it tries to look at the value in qa or selfhosted and doesn't see i
Okay, that makes sense.