mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 19:03:30 -05:00
Removing unused state parameter for _get_access_token()
Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
This commit is contained in:
@@ -164,7 +164,7 @@ def set_up_your_profile():
|
||||
login_gov_error = request.args.get("error")
|
||||
|
||||
if redis_client.get(f"invitedata-{state}") is None:
|
||||
access_token = sign_in._get_access_token(code, state)
|
||||
access_token = sign_in._get_access_token(code)
|
||||
|
||||
debug_msg("Got the access token for login.gov")
|
||||
user_email, user_uuid = sign_in._get_user_email_and_uuid(access_token)
|
||||
|
||||
@@ -39,7 +39,7 @@ def _reformat_keystring(orig): # pragma: no cover
|
||||
return new_keystring
|
||||
|
||||
|
||||
def _get_access_token(code, state): # pragma: no cover
|
||||
def _get_access_token(code): # pragma: no cover
|
||||
client_id = os.getenv("LOGIN_DOT_GOV_CLIENT_ID")
|
||||
access_token_url = os.getenv("LOGIN_DOT_GOV_ACCESS_TOKEN_URL")
|
||||
keystring = os.getenv("LOGIN_PEM")
|
||||
@@ -110,7 +110,7 @@ def _do_login_dot_gov(): # $ pragma: no cover
|
||||
|
||||
# activate the user
|
||||
try:
|
||||
access_token = _get_access_token(code, state)
|
||||
access_token = _get_access_token(code)
|
||||
user_email, user_uuid = _get_user_email_and_uuid(access_token)
|
||||
if not is_gov_user(user_email):
|
||||
current_app.logger.error(
|
||||
@@ -211,7 +211,7 @@ def sign_in(): # pragma: no cover
|
||||
url = os.getenv("LOGIN_DOT_GOV_INITIAL_SIGNIN_URL")
|
||||
|
||||
nonce = secrets.token_urlsafe()
|
||||
redis_key = f"-{unquote(nonce)}"
|
||||
redis_key = f"login-nonce-{unquote(nonce)}"
|
||||
redis_client.set(redis_key, nonce)
|
||||
|
||||
# handle unit tests
|
||||
|
||||
Reference in New Issue
Block a user