مكون إضافة تسجيل الدخول باستخدام Ethereum

من فضلك أخبرنا بكل الأشياء التي قمت بها لإضافة هذا المكون الإضافي.
هل أضفت before_code كما هو موضح سابقًا في هذا الموضوع؟
هل هذا تثبيت قياسي؟

إعجاب واحد (1)

في app.yml تمت إضافة مثل - git clone https//GitHub—-.git
تم الاستضافة الذاتية على Ubuntu 18، وهو تثبيت قياسي باستخدام الأمر ./setup

إذًا لم تفعل هذا

إعجاب واحد (1)

@RGJ هل يمكنك من فضلك إخباري بكيفية إضافة هذا قبل_الكود، وهل يمكنك مشاركة المنشور معي مع قبل_الكود

لا، أنا آسف، يمكنك استخدام Ctrl-F للبحث عن الموضوع وسيؤدي ذلك إلى الإجابة.

3 إعجابات

@RGJ يشير إلى الدليل الموجود في github :slight_smile: GitHub - spruceid/discourse-siwe-auth: Discourse plugin for SIWE authentication

في ملف app.yml تحتاج إلى إضافة الأقسام أسفل قسم hooks

إعجابَين (2)

شكرا لك @RGJ و @Tris20 ، سأجرب هذا وأبلغكم

لقد نجح الأمر حقًا، لا أعرف لماذا لم أتمكن من رؤيته في وقت سابق :slightly_smiling_face:

تحديث: تم الانتهاء من التثبيت والمكون الإضافي يعمل بشكل جيد، والآن أقوم بالاختبار فقط باستخدام محفظة ETH لتسجيل الدخول.

4 إعجابات

أعتقد أن هذا معطل، لا يظهر أي نافذة منبثقة (طلب توقيع) عند الضغط على زر “Sign with Ethereum” في صفحة /discourse-siwe/auth.

فيما يلي سجلات وحدة التحكم التي تظهر عند النقر على الزر.

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)

إنها تعمل لدي في كلا الاختبارين - اجتازت كاختبار مستقر، باستخدام معرف Infura.
كيف قمت بتكوين المكون الإضافي؟

حسنًا، لقد جربت مفتاح infura أو RPC العام، بالإضافة إلى إدخال RPC الرئيسي يدويًا من infura. لست متأكدًا مما إذا كانت هذه هي المشكلة.

هل من الممكن تعديل/تنسيق نافذة تسجيل الدخول باستخدام الإيثريوم؟

هل يمكنني إضافة شبكات أخرى متوافقة مع الإيثيريوم أيضًا؟

هل يمكنك تقديم مثال على “شبكة صديقة للإيثيريوم”؟

أعني مثل BSC تمامًا

أعني “سلسلة بينانس الذكية”

خطأ جديد

نعم، لقد أضفت خطافات الكود السابقة. يبدأ الخطأ هنا ولا يحدث عند التعليق على إضافة siwe-auth.

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

انظر الخطأ أدناه

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 يرجى الاطلاع على ما ورد أعلاه، نأمل أن نتمكن من الحل بسرعة ^

السجل الكامل:

تم حذف البيانات@السيرفر:/var/discourse$ sudo ./launcher rebuild app
تم الكشف عن معمارية x86_64

الحل موجود (كان موجودًا) بالفعل في نسختنا المعدلة على https://github.com/communiteq/discourse-siwe-auth، لم نقم بتقديم طلب سحب (PR) إلى المصدر الرئيسي بعد لأن التزامات الإصلاح فوضوية بعض الشيء، لكنها تعمل بشكل جيد.

إعجاب واحد (1)