Skip to content

Commit

Permalink
[api_requests] Disabled login with credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
CastagnaIT committed Apr 16, 2024
1 parent efeaac7 commit 61ae167
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions resources/lib/utils/api_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,25 @@ def login(ask_credentials=True):
try:
is_success = False
credentials = None
is_login_with_credentials = True
is_login_with_credentials = False
# The database 'isAdsPlan' value is stored after the login, so the first time we have None value
# this avoids to show the notice message multiple times if more login attempts will be done over the time
show_ads_notice = G.LOCAL_DB.get_value('is_ads_plan', None, table=TABLE_SESSION) is None
if ask_credentials:
is_login_with_credentials = ui.show_yesno_dialog('Login', common.get_local_string(30340),
yeslabel=common.get_local_string(30341),
nolabel=common.get_local_string(30342))
if is_login_with_credentials:
credentials = {'credentials': ui.ask_credentials()}
# if is_login_with_credentials:
# credentials = {'credentials': ui.ask_credentials()}
if is_login_with_credentials:
# The login page is changed now part of HTML seem protected by reCaptcha
# in the HTML page the reactContext data is added after the reCaptcha checks so at the moment
# it is not accessible by requesting the login page through python script,
# this prevents us to get the authURL code needed to perform the login request
ui.show_ok_dialog('Login',
'Due to new website protections at moment the login with credentials is not available.')
is_login_with_credentials = False

if is_login_with_credentials:
if common.make_call('login', credentials):
is_success = True
Expand Down

0 comments on commit 61ae167

Please sign in to comment.