mirror of
https://github.com/nextcloud/twofactor_gateway.git
synced 2026-04-25 09:05:55 +03:00
[GH-ISSUE #816] Cannot add Signal provider #132
Labels
No labels
0. to triage
1. to develop
3. to review
blocked
bug
discussion
duplicate
enhancement
enhancement
gateway:signal
gateway:signal
gateway:signal
gateway:sms
gateway:telegram
hacktoberfest
help wanted
invalid
needs info
php
pull-request
question
technical debt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/twofactor_gateway-nextcloud#132
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @oleua on GitHub (Dec 23, 2025).
Original GitHub issue: https://github.com/nextcloud/twofactor_gateway/issues/816
Hi! I am using
bbernhard/signal-cli-rest-apidocker container with Signal app inside. The account is registered and is working well.I decided to try to setup it to have 2FA when logging in to NC.
Running
./occ twofactorauth:gateway:configure signalleads to the error:An unhandled exception has been thrown: Error: Call to a member function cliConfigure() on null in /media/data/www/html/nextcloud-dev/apps/twofactor_gateway/lib/Command/Configure.php:55 Stack trace: #0 /media/data/www/html/nextcloud-dev/3rdparty/symfony/console/Command/Command.php(326): OCA\TwoFactorGateway\Command\Configure->execute() #1 /media/data/www/html/nextcloud-dev/3rdparty/symfony/console/Application.php(1078): Symfony\Component\Console\Command\Command->run() #2 /media/data/www/html/nextcloud-dev/3rdparty/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand() #3 /media/data/www/html/nextcloud-dev/3rdparty/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun() #4 /media/data/www/html/nextcloud-dev/lib/private/Console/Application.php(187): Symfony\Component\Console\Application->run() #5 /media/data/www/html/nextcloud-dev/console.php(90): OC\Console\Application->run() #6 /media/data/www/html/nextcloud-dev/occ(33): require_once('...')I managed to make the settings manually
./occ twofactorauth:gateway:configurewith later selecting signal and addinghttp://127.0.0.1:9911port and adding my number, which already exists.I tried to proceed unsuccessfully with adding my own phone number in webUI and got error in logs:
{"reqId":"*****","level":3,"time":"2025-12-23T22:49:40+02:00","remoteAddr":"***.***.***.***","user":"master","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/twofactor_gateway/settings/signal/verification/start","message":"Client error: `POST http://127.0.0.1:9911/v2/send` resulted in a `400 Bad Request` response:\n{\"error\":\"Couldn't process request - invalid request\"}\n","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36","version":"32.0.3.2","exception":{"Exception":"GuzzleHttp\\Exception\\ClientException","Message":"Client error: `POST http://127.0.0.1:9911/v2/send` resulted in a `400 Bad Request` response:\n{\"error\":\"Couldn't process request - invalid request\"}\n","Code":400,"Trace":[{"file":"/var/www/html/nextcloud-dev/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":72,"function":"create","class":"GuzzleHttp\\Exception\\RequestException","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud-dev/3rdparty/guzzlehttp/promises/src/Promise.php","line":209,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud-dev/3rdparty/guzzlehttp/promises/src/Promise.php","line":158,"function":"callHandler","class":"GuzzleHttp\\Promise\\Promise","type":"::"},{"file":"/var/www/html/nextcloud-dev/3rdparty/guzzlehttp/promises/src/TaskQueue.php","line":52,"function":"GuzzleHttp\\Promise\\{closure}","class":"GuzzleHttp\\Promise\\Promise","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud-dev/3rdparty/guzzlehttp/promises/src/Promise.php","line":251,"function":"run","class":"GuzzleHttp\\Promise\\TaskQueue","type":"->"},{"file":"/var/www/html/nextcloud-dev/3rdparty/guzzlehttp/promises/src/Promise.php","line":227,"function":"invokeWaitFn","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/var/www/html/nextcloud-dev/3rdparty/guzzlehttp/promises/src/Promise.php","line":272,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/var/www/html/nextcloud-dev/3rdparty/guzzlehttp/promises/src/Promise.php","line":229,"function":"invokeWaitList","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/var/www/html/nextcloud-dev/3rdparty/guzzlehttp/promises/src/Promise.php","line":69,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/var/www/html/nextcloud-dev/3rdparty/guzzlehttp/guzzle/src/Client.php","line":189,"function":"wait","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/var/www/html/nextcloud-dev/lib/private/Http/Client/Client.php","line":277,"function":"request","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/html/nextcloud-dev/apps/twofactor_gateway/lib/Provider/Channel/Signal/Gateway.php","line":129,"function":"post","class":"OC\\Http\\Client\\Client","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud-dev/apps/twofactor_gateway/lib/Service/SetupService.php","line":66,"function":"send","class":"OCA\\TwoFactorGateway\\Provider\\Channel\\Signal\\Gateway","type":"->"},{"file":"/var/www/html/nextcloud-dev/apps/twofactor_gateway/lib/Controller/SettingsController.php","line":83,"function":"startSetup","class":"OCA\\TwoFactorGateway\\Service\\SetupService","type":"->"},{"file":"/var/www/html/nextcloud-dev/lib/private/AppFramework/Http/Dispatcher.php","line":204,"function":"startVerification","class":"OCA\\TwoFactorGateway\\Controller\\SettingsController","type":"->"},{"file":"/var/www/html/nextcloud-dev/lib/private/AppFramework/Http/Dispatcher.php","line":118,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud-dev/lib/private/AppFramework/App.php","line":153,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud-dev/lib/private/Route/Router.php","line":321,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud-dev/ocs/v1.php","line":61,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud-dev/ocs/v2.php","line":8,"args":["/var/www/html/nextcloud-dev/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud-dev/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php","Line":111,"message":"Client error: `POST http://127.0.0.1:9911/v2/send` resulted in a `400 Bad Request` response:\n{\"error\":\"Couldn't process request - invalid request\"}\n","exception":{},"CustomMessage":"Client error: `POST http://127.0.0.1:9911/v2/send` resulted in a `400 Bad Request` response:\n{\"error\":\"Couldn't process request - invalid request\"}\n"}}NC32 bare metal, Apache, PHP 8.3.
Two-factor Gateway App 2.0.0.
@oleua commented on GitHub (Jan 28, 2026):
Hi! Finally I've done it manually with:
occ config:app:get twofactor_gateway signal_url-> get the value of signal_url, if anysudo -u www-data php ./occ config:app:set twofactor_gateway signal_url --type=string --value='http://localhost:9921'-> changed the URL and port
occ twofactorauth:gateway:configure signal-> finally, configured it