Skip to content

Commit

Permalink
fix (backend): check only SSOtoken validity before making request
Browse files Browse the repository at this point in the history
  • Loading branch information
premagarwals authored Jul 14, 2024
1 parent 41e190b commit c1aaf28
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ def request_otp():

session = requests.Session()
erp_utils.set_cookie(session, "JSESSIONID", all_fields["sessionToken"])
if not erp.session_alive(session=session):
return ErpResponse(
False, f"Session isn't alive. PLease login again.", status_code=401
).to_response()
erp.request_otp(
headers=headers, session=session, login_details=login_details, log=True
)
Expand Down Expand Up @@ -150,10 +146,6 @@ def login():

session = requests.Session()
erp_utils.set_cookie(session, "JSESSIONID", all_fields["sessionToken"])
if not erp.session_alive(session=session):
return ErpResponse(
False, f"Session isn't alive. PLease login again.", status_code=401
).to_response()
ssoToken = erp.signin(
headers=headers, session=session, login_details=login_details, log=True
)
Expand Down

0 comments on commit c1aaf28

Please sign in to comment.