@synonymdev/pubky
    Preparing search index...

    Interface GrantAuthFlowOptions

    Options for starting a grant-backed pubkyauth flow.

    interface GrantAuthFlowOptions {
        approvalFormat?: GrantApprovalFormat;
        clientId: string;
        expectedSigner?: string | null;
        relay?: string | null;
        xCallback?: XCallbackParams | null;
    }
    Index
    approvalFormat?: GrantApprovalFormat

    Relay approval format. signedApprovalV1 delivers keys for approved e scopes and rejects bare-grant downgrades. Omitted or bareGrant selects a grant without an approval envelope. signedApprovalV1 sets af=v1 in the authorization link.

    clientId: string

    App identifier shown in the user's grant/session list, typically a domain.

    expectedSigner?: string | null

    Optional expected identity: public key of the signed-in user that must approve, as raw z32 or pubky<z32>. Set it only when the app already knows the user, e.g. to re-authorize or request more capabilities. It adds spk to the link; signers approve with that key or refuse, and the flow rejects approvals from any other key. Switching accounts takes a flow without it. Sign-up flows reject it.

    relay?: string | null

    Optional HTTP relay base, e.g. "https://demo.httprelay.io/inbox/". Defaults to the default Synonym-hosted relay when omitted.

    xCallback?: XCallbackParams | null

    Optional return destinations for success, error, and cancellation.