From b890beb90d45c06724c6929061c08995c49d5104 Mon Sep 17 00:00:00 2001 From: Luis Alvergue Date: Wed, 29 May 2024 17:19:07 +0000 Subject: [PATCH] feat(oauth): add optional error_code to authorize view --- benefits/oauth/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/benefits/oauth/views.py b/benefits/oauth/views.py index ae24c2f400..f96ce741b8 100644 --- a/benefits/oauth/views.py +++ b/benefits/oauth/views.py @@ -79,7 +79,10 @@ def authorize(request): session.update(request, oauth_token=id_token, oauth_claim=stored_claim) - analytics.finished_sign_in(request) + if claim_value is not None and claim_value >= 10: + analytics.finished_sign_in(request, error=claim_value) + else: + analytics.finished_sign_in(request) return redirect(ROUTE_CONFIRM)