effect-playwright
    Preparing search index...

    Interface Credentials

    import { Effect } from "effect";
    import { Playwright } from "effect-playwright";

    const program = Effect.gen(function* () {
    const browser = yield* Playwright.Browser;
    const context = yield* browser.newContext();
    yield* context.credentials.install;
    const credential = yield* context.credentials.create("example.com");
    const credentials = yield* context.credentials.get({ id: credential.id });
    yield* context.credentials.delete(credential.id);
    return credentials;
    });

    0.5.1

    interface Credentials {
        create: (
            rpId: string,
            options?: {
                id?: string;
                privateKey?: string;
                publicKey?: string;
                userHandle?: string;
            },
        ) => Effect<
            {
                id: string;
                privateKey: string;
                publicKey: string;
                rpId: string;
                userHandle: string;
            },
            PlaywrightError,
        >;
        delete: (id: string) => Effect<void, PlaywrightError>;
        get: (
            options?: { id?: string; rpId?: string },
        ) => Effect<
            {
                id: string;
                privateKey: string;
                publicKey: string;
                rpId: string;
                userHandle: string;
            }[],
            PlaywrightError,
        >;
        install: Effect<void, PlaywrightError>;
    }
    Index
    create: (
        rpId: string,
        options?: {
            id?: string;
            privateKey?: string;
            publicKey?: string;
            userHandle?: string;
        },
    ) => Effect<
        {
            id: string;
            privateKey: string;
            publicKey: string;
            rpId: string;
            userHandle: string;
        },
        PlaywrightError,
    >

    Seeds a virtual WebAuthn credential and returns it.

    0.5.1

    delete: (id: string) => Effect<void, PlaywrightError>

    Removes a credential from the virtual authenticator.

    0.5.1

    get: (
        options?: { id?: string; rpId?: string },
    ) => Effect<
        {
            id: string;
            privateKey: string;
            publicKey: string;
            rpId: string;
            userHandle: string;
        }[],
        PlaywrightError,
    >

    Returns credentials currently held by the virtual authenticator.

    0.5.1

    install: Effect<void, PlaywrightError>

    Installs the virtual WebAuthn authenticator into the browser context.

    0.5.1