-
Notifications
You must be signed in to change notification settings - Fork 61
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
Can't reactivate twofactor_gateway #226
Comments
Apparently an invalid value type is passed as parameter. I assume it is In the case of Telegram this is a bit of a problem because the |
This won't help solving your issue but it's a known bug/limitation:
|
This is likely related to #110. Unfortunately I have not found the time yet to work on that as this app is low on my priority list, so any help would be highly appreciated 🙌 |
Hi
Replacing $chatId = $this->config->getUserValue($user->getUID(), 'twofactor_gateway', 'telegram_chat_id', null); by this line (suppose that 999999 is my chat_id) $chatId = 999999 With this change, all is ok. I can configure the gateway, I get the verification code on my telegram APP , I can deactivate and activate again the twofactor_gateway, ..., all is OK. All the problems related by @Dretech in this issue #110 appear to be solved. So, in consequence, I think that the problem is in this line, it isn't getting the number (our chat_id) that we previously have introduced in the verify box $chatId = $this->config->getUserValue($user->getUID(), 'twofactor_gateway', 'telegram_chat_id', null); I don't know how to make this changes in PHP, but it could be a good clue to solve the issue. |
Hi parreitu, |
Hello Parreitu, You found the cause why the Telegram 2fa app is not working in Nextcloud. When I change the chatid by the way you described, the app is working! Thanks. @ChristophWurst can you change line 86 of /lib/Service/Gateway/Telegram/Gateway.php in a way that this line uses the user id entered in the web interface? Dretech |
It's on my todo! |
I deactivated twofactor_gateway some days ago and wanted to reactivate it. When i enter my identification it says: "Could not verify your code. Please try again". This could be found in the log:
`[index] Error: UnexpectedValueException: Only integers, floats and strings are allowed as value at <>
setUserValue("admin", "twofactor_gateway", "telegram_chat_id", null)
getChatId(OC\User\User {}, Telegram\Bot\Api {}, 123456789)
send(OC\User\User {}, "123456789", "253871 is your ... .")
startSetup(OC\User\User {}, "telegram", "123456789")
startVerification("telegram", "123456789")
executeController(OCA\TwoFactorGat ... {}, "startVerification")
dispatch(OCA\TwoFactorGat ... {}, "startVerification")
main("OCA\TwoFactorG ... r", "startVerification", OC\AppFramework\ ... {}, {gateway: "teleg ... "})
__invoke({gateway: "teleg ... "})
call_user_func(OC\AppFramework\ ... {}, {gateway: "teleg ... "})
match("/apps/twofactor ... t")
handleRequest()
POST /apps/twofactor_gateway/settings/telegram/verification/start
from 91.67.178.10 by admin at 2019-04-17T19:28:16+00:00`
What can i do to reactivate twofactor_gateway?
Kind regards,
Sebastian
The text was updated successfully, but these errors were encountered: