Open satyendera opened 3 years ago
@satyendera - I'm unaware of a built-in option to do what you're asking.
There are two main ways of reacting to "errors" from the widget:
afterError
events ( https://github.com/okta/okta-signin-widget#aftererror )However neither of these is written to trap user authentication issues (as those are viewed as "normal" user interactions managed by the widget, not "errors" requiring a response from the application).
Can you elaborate on what you are hoping to accomplish? Monitoring user activity may well fall to some other Okta services where it can be more efficient and secure.
yea thanks @swiftone . it works and i am getting all the required information like
context.controller : primary-auth error.name : AuthApiError error.message : Authentication failed error.statusCode: 401
just curios to know is there any Okta services or hooks or any login failure callback also for this ?
thanks for your help.
Here is summary of okta failed authentication tracking :-
We are using okta-signin-widget (version 4.5.0) with setCookieAndRedirect() function , we found renderEl function is providing callback for success and error only.
Where success in case of success authentication and error callback in case of widget rendering error or misconfiguration.
Do we have callback for failed authentication as well ? , although we tried failure callback but it didn’t work. Please have a look for below peace of code how we are using
const SignInWidget = require('@okta/okta-signin-widget'); signInWidget.renderEl(
We went through guide (Okta Sign-In Widget Guide | Okta Developer) as well but there is also failed authentication in not mentioned.
Please help here.