Commit Graph

39 Commits

Author SHA1 Message Date
Mads Marquart
8ac6dc4ae6 Update SERVER_JS_DEFINE_REGEX, so logging in on newer FB versions work 2020-06-14 22:27:26 +02:00
Mads Marquart
a6cf1d5c89 Add _util.now, fixing a few places where datetimes were incorrectly used 2020-06-14 22:26:52 +02:00
Mads Marquart
8824a1c253 Set override Facebook's auto-locale detection during login
The locale is only used during error handling, and makes it harder for
users to report errors
2020-06-07 13:59:27 +02:00
Mads Marquart
cf0e1e3a93 Test on_2fa_callback with authentication applications 2020-06-07 12:37:36 +02:00
Mads Marquart
2319fc7c4a Handle early return from two_factor_helper 2020-06-07 12:35:24 +02:00
Mads Marquart
b35240bdda Handle locked accounts 2020-06-07 12:35:07 +02:00
Mads Marquart
6141cc5a41 Update SERVER_JS_DEFINE_REGEX 2020-06-07 12:04:51 +02:00
Mads Marquart
b1e438dae1 Few fixes to 2FA flow 2020-05-16 19:30:03 +02:00
Mads Marquart
3c0f411be7 Fix typo in 2FA logic 2020-05-10 12:01:41 +02:00
Mads Marquart
18a3ffb90d Fix Client.fetch_image_url in some cases
Sometimes (or always?), jsmods require includes a JS version specifier.

This means we couldn't find the url
2020-05-07 11:46:42 +02:00
Mads Marquart
d11f417caa Make logins persistent 2020-05-07 10:56:47 +02:00
Mads Marquart
81584d328b Add more session tests and small error improvements 2020-05-07 10:15:51 +02:00
Mads Marquart
7be2acad7d Initial re-add of 2FA 2020-05-06 23:34:27 +02:00
Mads Marquart
079d4093c4 Use messenger.com URLs instead of facebook.com
This should allow people who have only created a messenger account to
log in.

Also parse required `fb_dtsg` and `client_revision` values better.

The 2-fa flow is removed for now, I'll re-add it later.
2020-05-06 21:57:24 +02:00
Mads Marquart
11534604fe Remove user agent randomization
Caused problems with logging in, and didn't really help on anything
2020-03-11 15:44:34 +01:00
Mads Marquart
c27f599e37 Fix type specifiers in models 2020-03-11 14:43:28 +01:00
Mads Marquart
6660fd099d Fix uploading, and move it to Client.upload (making it public again) 2020-03-11 11:48:04 +01:00
Mads Marquart
e6ec5c5194 Redo jsmods loading and fb_dtsg retrieving 2020-03-11 11:23:39 +01:00
Mads Marquart
987993701f Fix NotLoggedIn 2020-01-25 15:07:04 +01:00
Mads Marquart
01effb34b4 Add Session.user in favor of Session.user_id 2020-01-25 11:42:32 +01:00
Mads Marquart
2cb43ff0b0 Fix typo 2020-01-23 16:56:15 +01:00
Mads Marquart
16081fbb19 Clean up utility functions 2020-01-23 16:19:09 +01:00
Mads Marquart
c83836ceed Rename _core.py -> _common.py 2020-01-23 14:06:26 +01:00
Mads Marquart
45a71fd1a3 Add inline examples 2020-01-23 12:07:40 +01:00
Mads Marquart
89f90ef849 Make all models frozen, and sessions hashable 2020-01-23 10:18:33 +01:00
Mads Marquart
3d3b0f9e91 Remove todo page and testing page in documentation 2020-01-22 23:00:45 +01:00
Mads Marquart
2644aa9b7a Add type hints, and clean up Client a bit 2020-01-22 01:43:04 +01:00
Mads Marquart
c0425193d0 Various error improvements 2020-01-15 15:15:50 +01:00
Mads Marquart
28791b2118 Add ExternalError.description and GraphQLError.debug_info 2020-01-15 14:03:35 +01:00
Mads Marquart
e25f53d9a9 Wrap requests exceptions 2020-01-15 12:19:28 +01:00
Mads Marquart
8f25a3bae8 Fix exceptions in tests 2020-01-15 11:17:51 +01:00
Mads Marquart
3cdd646c37 Move error handling functions to _exception 2020-01-15 11:05:59 +01:00
Mads Marquart
3445eccc32 Initial redo of exceptions 2020-01-15 10:49:16 +01:00
Mads Marquart
6b39e58eb8 Improve login error handling 2020-01-09 17:05:09 +01:00
Mads Marquart
0e0fce714a Allow on_2fa_callback to be None in Session.login 2020-01-09 10:39:30 +01:00
Mads Marquart
cf24c7e8c2 Add Session and Client __repr__ implementations 2020-01-09 10:32:30 +01:00
Mads Marquart
a36ff5ee6e Make Session.user_id readonly 2020-01-08 12:24:47 +01:00
Mads Marquart
41f1007936 Make Session public 2020-01-08 10:33:25 +01:00
Mads Marquart
092573fcbb Rename State -> Session 2020-01-08 10:16:40 +01:00