
srnpu (srnpu) asked a question.
We have integrated the OKTA sign in widget into our Angular SPA application.
From time to time we get users that can't login and we would like to start logging the errors via an API call.
I would like to gather the user name that was entered by the user when attempting the sign-in.
I am wondering what is the best way to get this data (even if the error occurs later in the flow i.e during MFA). Most of the examples I was able to find pull the user name from the claims after successfull authentication. I need to get the user entered user name as the claims will not always be available.

Hello @srnpu (srnpu) Thank you for reaching out to our Community!
Please take a look at this documentation which might provide the information you are looking for:
https://developer.okta.com/docs/guides/custom-widget/main/#per-application-customization
My advice would be to leverage the Okta Developer forums for this type of questions and take advantage of their expertise.
https://devforum.okta.com/