1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-02 17:53:41 +00:00

feat: hacky working totp

This commit is contained in:
Andreas Coroiu
2025-10-28 10:37:33 +01:00
parent 01e261fdb8
commit 03bca10a37

View File

@@ -40,8 +40,10 @@ export class TotpService implements TotpServiceAbstraction {
return this.remoteSdkService.remoteClient$.pipe(
switchMap(async (sdk) => {
using ref = await sdk.take();
console.log("TOTP", await ref.value.vault().await.totp());
return ref.value.vault().await.totp().await.generate_totp(key);
// TODO: Bug, for some reason .await is not available after totp()
// return ref.value.vault().await.totp().await.generate_totp(key);
const totp = await ref.value.vault().await.totp();
return totp.generate_totp(key);
}),
shareReplay({ bufferSize: 1, refCount: true }),
);