The solution is (was) already in our fork at GitHub - communiteq/discourse-siwe-auth: Discourse plugin for SIWE authentication, we have not made a PR to upstream yet because the fix commits are a bit messy, but it works fine.
1 Like