Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
goums opened this issue Jun 29, 2023 · 0 comments

Comments

@goums
Copy link

goums commented Jun 29, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant