Skip to content

Invalid signature recovery are logged via console.error, breaking applications with custom logging flow #172

@goums

Description

@goums

The library should not use console.error internally, because it is not compatible with any custom logging flow (for example sending json formatted logs, to use in most SAAS logging analysis platform).

This specific console.error is causing some issues on our own integration:
https://github.com/spruceid/siwe/blob/main/packages/siwe/lib/client.ts#L297

/** Recover address from signature */
let addr;
try {
    addr = (0, ethersCompat_1.verifyMessage)(EIP4361Message, signature);
}
catch (e) {
    console.error(e);
}

I think it should return the error directly (or catch & reformat it), but not log it internally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions