תוסף התחברות עם Ethereum

Please tell us about all the things you did to add this plugin.
Did you add the before_code as described earlier in this topic?
Is this a standard install ?

לייק 1

in app.yml Added like - git clone https//GitHub—-.git

Selfhosted on Ubuntu 18 , and it is standard install with ./setup command

So you did not do this

לייק 1

@RGJ can you please tell me how to add this before_code , and please share me post with the before_code

No, I’m sorry, you can use ctrl-f to search the topic and it will lead you to the answer.

3 לייקים

@RGJ is referring to the guide in the github :slight_smile: GitHub - spruceid/discourse-siwe-auth: Discourse plugin for SIWE authentication

In the app.yml file you need to add the sections below the hooks section

2 לייקים

thankyou @RGJ and @Tris20 , will try this and update you

it really did thanks dont know why i was not able to see it earlier :slightly_smiling_face:

update : Installation done and plugin is working fine , now just testing with ETH wallet to login.

4 לייקים

I believe this is broken, no popup (ask for sign) is happening when you press the “Sign with Ethereum” button on /discourse-siwe/auth page.

Below are the console logs that show up when you click the button.

SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
    at Function.parse [as parseJSON] (<anonymous>)
    at n (ajax-error.js:29:1)
    at e.popupAjaxError (ajax-error.js:71:1)
    at y (rsvp.js:435:1)
    at v (rsvp.js:421:1)
    at f (rsvp.js:370:1)
    at m.invoke (queue.ts:203:14)
    at m.flush (queue.ts:98:13)
    at f.flush (deferred-action-queues.ts:75:19)
    at $._end (index.ts:616:32)
    at _boundAutorunEnd (index.ts:257:12)
TypeError: Cannot destructure property 'message' of '(intermediate value)' as it is undefined.
    at e.signMessage (web3modal.js:66:1)
    at async e.runSigningProcess (web3modal.js:82:1)
    at async e.initAuth (siwe-auth-index.js:38:1)

It’s working for me on both tests-passed as stable, using an Infura ID.
How did you configure the plugin?

Hmm I tried both infura key or public RPC’s, aswel as manually entered the mainnet RPC from infura. I’m not sure if that is the problem.

Is it possible to edit/style the sign in with eth popup?

Can I add other Ethereum friendly networks as well?

Can you give an example of an “Ethereum friendly network” ?

I mean just like BSC

I mean “Binance Smart Chain”

New Error

Yes, I added the before code hooks. The error starts here and does not happen when I comment out the siwe-auth plugin.

I, [2025-02-11T03:40:25.992538 #1]  INFO -- : 
I, [2025-02-11T03:40:25.993236 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
hooks:
  before_code:
    - exec:
        cmd:
          - gem install rubyzip
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-gamification
          - git clone https://github.com/discourse/discourse-chat-integration
          - git clone https://github.com/angusmcleod/discourse-events
          - git clone https://github.com/discourse/discourse-ai
          - git clone https://github.com/discourse/discourse-subscriptions
          - git clone https://github.com/discourse/discourse-translator
          - git clone https://github.com/discourse/discourse-signatures
          - git clone https://github.com/merefield/discourse-locations
          - git clone https://github.com/discourse/discourse-reactions
          - git clone https://github.com/melhosseiny/discourse-nft-avatar
          - git clone https://github.com/discourse/discourse-follow
          - git clone https://github.com/spruceid/discourse-siwe-auth

See the error below

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 778 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "tag"=>"migrate", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

@RGJ please see above, hopefully we can quickly resolve ^

{“translation”: “יומן מלא:\n``\nredacted@server:/var/discourse$ sudo ./launcher rebuild app\nx86_64 ארכיטקטורה לזיהוי”}

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