mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 21:33:27 +00:00
[PM-16793] port credential generator service to providers (#14071)
* introduce extension service * deprecate legacy forwarder types * eliminate repeat algorithm emissions * extend logging to preference management * align forwarder ids with vendor ids * fix duplicate policy emissions; debugging required logger enhancements ----- Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
This commit is contained in:
@@ -28,7 +28,7 @@ import {
|
||||
ToastService,
|
||||
TypographyModule,
|
||||
} from "@bitwarden/components";
|
||||
import { CredentialGeneratorService, GenerateRequest, Generators } from "@bitwarden/generator-core";
|
||||
import { CredentialGeneratorService, GenerateRequest, Type } from "@bitwarden/generator-core";
|
||||
|
||||
import { SendFormConfig } from "../../abstractions/send-form-config.service";
|
||||
import { SendFormContainer } from "../../send-form-container";
|
||||
@@ -122,12 +122,12 @@ export class SendOptionsComponent implements OnInit {
|
||||
}
|
||||
|
||||
generatePassword = async () => {
|
||||
const on$ = new BehaviorSubject<GenerateRequest>({ source: "send" });
|
||||
const on$ = new BehaviorSubject<GenerateRequest>({ source: "send", type: Type.password });
|
||||
const account$ = this.accountService.activeAccount$.pipe(
|
||||
pin({ name: () => "send-options.component", distinct: (p, c) => p.id === c.id }),
|
||||
);
|
||||
const generatedCredential = await firstValueFrom(
|
||||
this.generatorService.generate$(Generators.password, { on$, account$ }),
|
||||
this.generatorService.generate$({ on$, account$ }),
|
||||
);
|
||||
|
||||
this.sendOptionsForm.patchValue({
|
||||
|
||||
Reference in New Issue
Block a user