Browse Source

Merge branch 'main' into bugfix/improve-alignment-of-menu-item-icons

pull/2566/head
Thomas Kaul 2 years ago
committed by GitHub
parent
commit
cbd76cee34
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 18
      apps/client/src/app/services/web-authn.service.ts

1
CHANGELOG.md

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Fixed an issue in the biometric authentication
- Fixed the alignment of the icons in various menus - Fixed the alignment of the icons in various menus
## 2.16.0 - 2023-10-29 ## 2.16.0 - 2023-10-29

18
apps/client/src/app/services/web-authn.service.ts

@ -46,12 +46,10 @@ export class WebAuthnService {
switchMap((attOps) => { switchMap((attOps) => {
return startRegistration(attOps); return startRegistration(attOps);
}), }),
switchMap((attResp) => { switchMap((credential) => {
return this.http.post<AuthDeviceDto>( return this.http.post<AuthDeviceDto>(
`/api/v1/auth/webauthn/verify-attestation`, `/api/v1/auth/webauthn/verify-attestation`,
{ { credential }
credential: attResp
}
); );
}), }),
tap((authDevice) => tap((authDevice) =>
@ -65,6 +63,7 @@ export class WebAuthnService {
public deregister() { public deregister() {
const deviceId = this.getDeviceId(); const deviceId = this.getDeviceId();
return this.http return this.http
.delete<AuthDeviceDto>(`/api/v1/auth-device/${deviceId}`) .delete<AuthDeviceDto>(`/api/v1/auth-device/${deviceId}`)
.pipe( .pipe(
@ -82,20 +81,21 @@ export class WebAuthnService {
public login() { public login() {
const deviceId = this.getDeviceId(); const deviceId = this.getDeviceId();
return this.http return this.http
.post<PublicKeyCredentialRequestOptionsJSON>( .post<PublicKeyCredentialRequestOptionsJSON>(
`/api/v1/auth/webauthn/generate-assertion-options`, `/api/v1/auth/webauthn/generate-assertion-options`,
{ deviceId } { deviceId }
) )
.pipe( .pipe(
switchMap((requestOptionsJSON) => switchMap((requestOptionsJSON) => {
startAuthentication(requestOptionsJSON, true) return startAuthentication(requestOptionsJSON);
), }),
switchMap((assertionResponse) => { switchMap((credential) => {
return this.http.post<{ authToken: string }>( return this.http.post<{ authToken: string }>(
`/api/v1/auth/webauthn/verify-assertion`, `/api/v1/auth/webauthn/verify-assertion`,
{ {
credential: assertionResponse, credential,
deviceId deviceId
} }
); );

Loading…
Cancel
Save