XF 2.1 Error when trying to enable Authy for 2FA from Passwords and Security on site...

Chernabog

Well-known member
I (think) I properly made my Twilio account and received my API key to use for the Authy 2FA which I enabled. Tonight, I got around to trying it out and went ahead to enable it for my own 2FA. I was asked to enter my telephone number and when I did I got this error message on the website:

Code:
Template errors

    Template public:error: Object of class stdClass could not be converted to string (internal_data/code_cache/templates/l1/s21/public/error.php:13)

I then checked the ACP and saw this error in the server error log:

Code:
Server error log

    ErrorException: Template error: Object of class stdClass could not be converted to string internal_data/code_cache/templates/l1/s21/public/error.php:13

    Generated by: Chernabog Feb 25, 2019 at 8:33 PM

Stack trace

#0 internal_data/code_cache/templates/l1/s21/public/error.php(13): XF\Template\Templater->handleTemplateError(4096, 'Object of class...', '/usr/www/ultima...', 13, Array)
#1 src/XF/Template/Templater.php(1294): XF\Template\Templater->{closure}(Object(AddonFlare\PaidRegistrations\XF\Template\Templater), Array)
#2 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('error', Array)
#3 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#4 src/XF/Mvc/Renderer/Html.php(38): XF\Mvc\Renderer\Html->renderView('XF:Error', 'public:error', Array)
#5 src/XF/Mvc/Dispatcher.php(387): XF\Mvc\Renderer\Html->renderErrors(Array)
#6 src/XF/Mvc/Dispatcher.php(360): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\Error))
#7 src/XF/Mvc/Dispatcher.php(53): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\Error), 'html')
#8 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#9 src/XF.php(390): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}

Request state

array(4) {
  ["url"] => string(30) "/account/two-step/authy/enable"
  ["referrer"] => string(50) "https://titanx.games/account/two-step/authy/enable"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(5) {
    ["user_number"] => string(10) "410#######"
    ["dial_code"] => string(1) "1"
    ["intl_numb"] => string(12) "+1410#######"
    ["setup"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
  }
}

I have replaced my phone number in the error string with #s for privacy's sake. Can anyone shed some light on what I might be doing wrong? Thank you in advance!
 
I went into Authy and played around a bit -- I seem to have it working now. I found a 'builder' that helped me build the actual application step by step. One things I noticed that it is not doing is giving me the "ACCEPT" or "DENY" buttons by rather simply a code to enter as I would with google auth - making it not sure much a on touch solution.

Looking under "Push Authentication" on the Twilio website everything looks checked, but it seems that it wants a webhook (https:) address for that ....and I am not sure what that would be since this isn't actually a 'connected account' thing....??

I am surprised to even see addonflare's paid registrations in that message because the add-on should only impact before prior to joining OR if they purchase an upgrade while being joined....it should play no part in their security settings... :unsure:

Any thoughts (and thank you @ozzy47)
 
I had the same error but I was using the wrong API key, when you setup twilio you get about 6 codes and I apparently was dumb enough to use the wrong one :P
 
Last edited:
Top Bottom