diff --git a/benefits/oauth/views.py b/benefits/oauth/views.py index c92e035de..140ddfebc 100644 --- a/benefits/oauth/views.py +++ b/benefits/oauth/views.py @@ -128,23 +128,23 @@ def authorize(request): id_token = token["id_token"] # We store the returned claim in case it can be used later in eligibility verification. - verifier_claim = flow.claims_provider.claim + flow_claim = flow.claims_provider.claim stored_claim = None error_claim = None - if verifier_claim: + if flow_claim: userinfo = token.get("userinfo") if userinfo: - claim_value = userinfo.get(verifier_claim) + claim_value = userinfo.get(flow_claim) # the claim comes back in userinfo like { "claim": "1" | "0" } claim_value = int(claim_value) if claim_value else None if claim_value is None: - logger.warning(f"userinfo did not contain: {verifier_claim}") + logger.warning(f"userinfo did not contain: {flow_claim}") elif claim_value == 1: # if userinfo contains our claim and the flag is 1 (true), store the *claim* - stored_claim = verifier_claim + stored_claim = flow_claim elif claim_value >= 10: error_claim = claim_value