twofactor_gateway
twofactor_gateway copied to clipboard
Add CustomSMS a generic provider
Add CustomSMS a generic provider to send SMS using any webservice gateway
Apply lint pattern with php-cs
Run the command composer cs:fix
to check if have fixes to do on files that you changed. After run composer cs:fix
, only commit the files that you changed.
@daif Take a look at this branchβ¦
https://github.com/froonix/twofactor_gateway/tree/pr-473
I've cherry-picked your commit on top of the current master branch and fixed all conflicts. Feel free to use it at your PR.
@daif @vitormattos I've proposed some changes for the goto-issue and commited as 5d20f4d12e64689d8e37cee7524924c79ad0d861. What do you think about this alternative approach?
I've not tested these code changes or PR, but I really like the idea of a generic custom provider. Feel free to use something (or nothing) from my branch pr-473
. π
@killerbees19 this PR is very old. I suggest to you to send a new PR using your branch and solving the last reviews comments if @daif don't return to work in this PR. What you think about this?
I suggest to you to send a new PR using your branch and solving the last reviews comments if @daif don't return to work in this PR. What you think about this?
Good idea. I'll wait some days/weeks for @daif to react on his original PR. If there's no new activity, I'll test the feature and open a new PR with my changes.
(Feel free to ping me with @killerbees19 if there's no activity after some time. Chances are high that I'll forget it π)
I already did a ping February.
I already did a ping February.
Good point π
Anyways, I've no time at the moment. Maybe next weekend...
Hi all,
Has there been any progress on this front? We would love to use the custom SMS feature to send 2FA texts through our own little gateway (Teltonika TRB140). I tried using the proposed code, but the setup command through occ always fails with this error:
An unhandled exception has been thrown:
Error: Undefined constant OCA\TwoFactorGateway\AppInfo\Application::APP_NAME in /var/www/nextcloud/apps/twofactor_gateway/lib/Service/Gateway/SMS/Provider/CustomSMSConfig.php:61
Stack trace:
#0 /var/www/nextcloud/apps/twofactor_gateway/lib/Command/Configure.php(211): OCA\TwoFactorGateway\Service\Gateway\SMS\Provider\CustomSMSConfig->setUrl()
#1 /var/www/nextcloud/apps/twofactor_gateway/lib/Command/Configure.php(92): OCA\TwoFactorGateway\Command\Configure->configureSms()
#2 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\TwoFactorGateway\Command\Configure->execute()
#3 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#4 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#5 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#6 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#7 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#8 /var/www/nextcloud/occ(11): require_once('...')
I am not familiar enough with the codebase to figure out why this happens. So, it would be awesome if this functionality could make it to the Nextcloud app store sometime π
Best regards, Imre
/rebase
@daif: Have you progressed on it with Nextcloud team?