Comments (11)
4697fef adds support for two-factor auth with TOTP token. I tested it with one of my accounts but can you try it out before we close the issue?
Please note that there might be a slight delay(up to 2 seconds) between the time you type in the code and the time it is actually sent to discord, so try not to use TOTP tokens that are about to expire.
from bitlbee-discord.
Do you happen to have "
character in your password? If so d085abf should fix your issue. If not: are there any other non-alphanumeric characters in your password?
from bitlbee-discord.
Can't find anything about this in discord's API reference, so doubt it. In fact we should switch from password auth to OAuth2.
Is there any way to use Two-Factor Authentication with this?
Sent from my Android device with K-9 Mail. Please excuse my brevity.
from bitlbee-discord.
So um ... how are you connecting to Discord with this? Do I have to disable 2FA?
from bitlbee-discord.
I've taken a look and oauth seems to be bot-oriented so it won't give an application permission to post messages in your name, and they don't have any documentation on 2fa, so I'll have to see how the webclient does it and try to mimick it.
Can't give any time frame atm, so unfortunately bitlbee-discord won't work with 2fa enabled right now.
from bitlbee-discord.
Okay. I guess I am okay to have it disabled. Only issue would be for that one server that requires 2FA for admin privs.
from bitlbee-discord.
Thank you for implementing this feature. I must be doing something wrong however using the module.
After building the latest changes from master and adding it to my bitlbee installation (using Ubuntu 16.04.1 LTS, bitlbee 3.4.2-0ubuntu1), I'm performed the following steps:
acc add discord <email address>
/OPER <email address> <account password>
acc discord on
Status returned with ac l
shows the discord account as "Connecting". Eventually I get Connection timeout...signing off...Reconnecting in 5 seconds
.
I never was prompted to provide a token. I believe that I have the module properly installed and can run strings /usr/lib/bitlbee/discord.so
to show the output of 2FA token message prompts match the recent code changes.
Are there any variables to enable more logging without having to use a debug symbol-compiled version of bitlbee to troubleshoot further?
from bitlbee-discord.
Looks like for some reason it doesn't realize it needs to use mfa. Unfortunately there is no in place debug info, but you can use the following simple patch to for debugging.
After applying this run bitlbee with a bitlbee -nvD
command, then connect as usual and do the acc discord on
.
You should get a line like this:
discord_http_login_cb: { "mfa": true, "token": null, "ticket": "xxx" }
At least that is what bitlbee-discord expects when two-factor is enabled. If the output you get is any different please post it here (remove "token" and/or "ticket" values though).
from bitlbee-discord.
Well...Here is the bitlbee stdout
with your patch against discord-http.c
and after issuing ac discord on
:
erockce@nuc:~ $ sudo bitlbee -nvD
discord_http_login_cb: {"code": 0, "message": "400: Bad Request"}
Not sure if this is relevant but researching earlier for logging examples in other issues, I found in 21#issuecomment-196945011 and when querying discordapp.com
the response for me is:
erockce@nuc:~ $ curl -L http://discordapp.com/api/gateway
{"url": "wss://gateway.discord.gg"}
I tried setting BITLBEE_DEBUG=1
like @bleader used from 21#issuecomment-197243083 before running bitlbee -nvD
but there were no additional logging messages in the output or /var/log/syslog
for me.
FWIW, here was the result of patching and making:
erockce@ubuntu:~/Development/bitlbee-discord {mychanges 4697fef} $ patch -p 1 < ~/mfa_debug.patch
patching file src/discord-http.c
patch unexpectedly ends in middle of line
Hunk #2 succeeded at 147 with fuzz 1.
...
erockce@ubuntu:~/Development/bitlbee-discord {mychanges *% 4697fef} $ make
Making all in src
make[1]: Entering directory '/home/erockce/Development/bitlbee-discord/src'
CC discord_la-discord-http.lo
discord-http.c: In function ‘discord_http_mfa_cb’:
discord-http.c:140:5: warning: format not a string literal and no format arguments [-Wformat-security]
imcb_error(ic, (char*)json_o_str(js, "message"));
^
discord-http.c: In function ‘discord_http_login_cb’:
discord-http.c:188:7: warning: format not a string literal and no format arguments [-Wformat-security]
imcb_error(ic, err->str);
^
CCLD discord.la
make[1]: Leaving directory '/home/erockce/Development/bitlbee-discord/src'
make[1]: Entering directory '/home/erockce/Development/bitlbee-discord'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/home/erockce/Development/bitlbee-discord'
And here are the version of the packages (dev = ubuntu
and operational = nuc
environments):
erockce@ubuntu:~ $ for i in bitlbee-dev libglib2.0-dev ; do echo "---" ; dpkg -s $i | egrep '^Package|^Version' ; done
---
Package: bitlbee-dev
Version: 3.4.2-0ubuntu1
---
Package: libglib2.0-dev
Version: 2.48.1-1~ubuntu16.04.1
...
erockce@nuc:~ $ dpkg -s bitlbee | egrep '^Package|^Version'
Package: bitlbee
Version: 3.4.2-0ubuntu1
I use the facebook
and steam
plugins and both connect to their servers so Bitlbee is working.
from bitlbee-discord.
Yes there is and other special characters. I try to use strong passwords whenever possible. :)
Just updated and tested. 2FA works now!
from bitlbee-discord.
Hi @sm00th sorry I'm late on this. Works for me too and a big thanks for implementing this. :D
from bitlbee-discord.
Related Issues (20)
- [FEATURE] HOT 2
- Add variable auto_join_whitelist ?
- discord - Login error: Connection timeout HOT 2
- Https links appear in the wrong query HOT 1
- Embeds not showing
- Using CFLAGS and LDFLAGS on command line to find bitlbee includes and libs HOT 6
- Threads support HOT 3
- Backlog fetching blocks Discord websocket heartbeat, Bitlbee response to PING HOT 5
- Login in is broken with glib2 >2.68 HOT 11
- Failed to switch to websocket mode HOT 2
- token location described in README out of date HOT 3
- Status aliases broken - "/away DND - some text" works, "/away Busy - some text" does not HOT 4
- Will bitlbee-discord work with a big account? HOT 3
- No incoming messages HOT 7
- Provide way to manually request backlog HOT 3
- Seeing own messages after change to new usernames HOT 1
- joining a discord channel doesn't show anyone else messages HOT 1
- Crashes on discord_parse_message
- discord - Login error: Failed to switch to websocket mode (and 400 bad request from cloudflare) HOT 3
- Add support for turning custom stickers into URLs (e.g. larger custom emoji)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitlbee-discord.