diff --git a/libs/auth/src/angular/login/default-login-component.service.ts b/libs/auth/src/angular/login/default-login-component.service.ts index 620d328d5d..b897e5cf19 100644 --- a/libs/auth/src/angular/login/default-login-component.service.ts +++ b/libs/auth/src/angular/login/default-login-component.service.ts @@ -3,6 +3,7 @@ import { firstValueFrom } from "rxjs"; import { LoginComponentService, PasswordPolicies } from "@bitwarden/auth/angular"; import { SsoLoginServiceAbstraction } from "@bitwarden/common/auth/abstractions/sso-login.service.abstraction"; +import { ClientType } from "@bitwarden/common/enums"; import { CryptoFunctionService } from "@bitwarden/common/platform/abstractions/crypto-function.service"; import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @@ -10,6 +11,8 @@ import { Utils } from "@bitwarden/common/platform/misc/utils"; import { PasswordGenerationServiceAbstraction } from "@bitwarden/generator-legacy"; export class DefaultLoginComponentService implements LoginComponentService { + protected clientType: ClientType; + constructor( protected cryptoFunctionService: CryptoFunctionService, protected environmentService: EnvironmentService, @@ -31,6 +34,10 @@ export class DefaultLoginComponentService implements LoginComponentService { return false; } + isLoginWithPasskeySupported(): boolean { + return this.clientType == ClientType.Web; + } + async launchSsoBrowserWindow( email: string, clientId: "browser" | "desktop", diff --git a/libs/auth/src/angular/login/login-component.service.ts b/libs/auth/src/angular/login/login-component.service.ts index 55ade0a789..7b04dc53b6 100644 --- a/libs/auth/src/angular/login/login-component.service.ts +++ b/libs/auth/src/angular/login/login-component.service.ts @@ -36,6 +36,11 @@ export abstract class LoginComponentService { */ isLoginViaAuthRequestSupported: () => boolean; + /** + * Indicates whether login with passkey is supported on the given client + */ + isLoginWithPasskeySupported: () => boolean; + /** * Launches the SSO flow in a new browser window. * - Used by: Browser, Desktop diff --git a/libs/auth/src/angular/login/login.component.html b/libs/auth/src/angular/login/login.component.html index 23f4558390..61798e3679 100644 --- a/libs/auth/src/angular/login/login.component.html +++ b/libs/auth/src/angular/login/login.component.html @@ -39,8 +39,8 @@