-
Notifications
You must be signed in to change notification settings - Fork 62
Add Plivo as SMS Provider #352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor thing (except for your switch of callback
and src_number
in Configure.php
... Did this work for you?)...
|
I'm the one with the dirty tricks, so my approach was simply to copy the changed files to my test-nextcloud's directory and test it there. No npm, etc... ;) |
Yes, that is dirty...lolol but does work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only to prove that I have this petty German abilities to find something everywhere. Just give me a chance. :-D
Looks good to me!
Regarding Coding Style: I just remembered me running in the same "problem" - I'm far away from really knowing the guideline. But please don't tell anyone! ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated files as per comments
@boppy @ChristophWurst I just setup a development server on my VPS. Once I figure out how to generate the |
So I decided to copy the One problem: I run the |
I found a small bug in my code, which once fixes, the enable button appeared on the web interface. Now I get this: Could not verify your code. Please try again. Enter your identification (e.g. phone number to start the verification) |
I fixed another issue. The code sent, but I never received it on my phone. @ChristophWurst @boppy Is there a way to log the URL call that is made? |
I'm finally at the point where the code |
Figured out the issue. Had an invalid param being passed to Plivo. I get the 2fa codes to my cell phone!! However, the web UI still says Could not verify your code. Please try again. Enter your identification (e.g. phone number to start the verification): |
@ChristophWurst @boppy I have the |
@ChristophWurst What else do I need to do so this PR can be merged? |
Thanks for the approval! @boppy @ChristophWurst Should we be concerned that Travis CI doesn't pass all the tests? I took a look at the error codes, and it should to be unrelated to the source code. Also, do I need to sign-off on my code? |
While adding #346 I've also had those messages without a cause in my code. Since Christoph approved those, I think it's okay...
If you have the the tool chain at hand, I would totally recommend to sign any code you publish. And it's a 1-time-task to get this set up. You only have to touch it again if your signing key expires. You might want to squash and sign... @ChristophWurst I think those messages originate from the fact that nc/core#master is the 20 alpha already while 2fa has: twofactor_gateway/appinfo/info.xml Line 22 in 93218dd
Are there other problems you know of? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nitpicks
When you're done please squash the commit into one and add the sign-off :)
$this->logger->debug("api call: https://api.plivo.com/v1/Account/$authID/Message/" .print_r($apiParams,true)); | ||
$this->client->post("https://api.plivo.com/v1/Account/$authID/Message/", $apiParams); | ||
} catch (Exception $ex) { | ||
$this->logger->error($ex->getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->logger->error($ex->getMessage()); | |
$this->logger->logException($ex, [ | |
'message' => 'Could not send Plivo message: ' . $ex->getMessage(), | |
]); |
then the logged line will also contain a trace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy that. Given the 2 choices, when do you use error
and when do you use logException
?
@ChristophWurst @boppy
Right. Please bump this to 20 and add a job to the Travis matrix that tests against stable19 in a separate PR :) |
Just to confirm, you are expecting @boppy to update the XML and Travis or myself? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed, updated, and posted a new commit
I merged in the most recent changes from nextcloud/twofactor_gateway/master. I'll do another test on my dev server to be sure I can:
If there are tests which handle this, please let me know. @boppy Thanks for the links. Since I pushed my changes to my repo, can I still squash (i.e. rebase) the commits? A word of caution: Only do this on commits that haven’t been pushed an external repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed requested changes
Yes! That should be fine. Once this is merged you can reset your fork's master to ours or simply delete the fork repo because you're now allowed to push here directly :) Ideally features are developed on branches, so you can have more than one at a time and you master stays in sync with the upstream repo. |
"and you master stays in sync with the upstream repo." Does github automatically handle this? master to master sync? A better question is, how to reset my fork? |
No, it does not. https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork I think that describes it well :) Don't update the fork until this is merged, though, or you'll risk losing the commits. |
Thanks for the warning. |
@cdjenkins can you fix the conflicts and DCO issues? |
Thank you for your contribution and the time you put into this PR. Since then, I’ve taken over as maintainer of this app, and it has gone through a major refactor that changed much of the internal architecture and file structure. Because of that, this PR can’t be merged in its current form. If you’re still interested in this contribution, please feel free to rebase or open a new PR against the current main branch. Your effort is very valuable, even if we can’t merge this directly, it helps us move the app forward. Thanks again! |
@ChristophWurst @MorrisJobke @boppy @killerbees19
Added code to use Plivo as a SMS Provider.