Another way to go about might be to use userAuthenticator to handle the error...

Contribution Date
Technology
Contribution Project
Contribution Details

Another way to go about might be to use userAuthenticator to handle the error dispatching. This object already contains the event dispatcher

The class has the object protected, it will require a public helper method to use it outside the class.
Instead, I think we should inject the dependency inside OAuth2ControllerBase itself as optional, and if not passed, we'll use the service like the $renderer.

From, Comment #13 - third point.

Do we need this? I wonder if the event listener can't just do the redirection if there's an error in provider.

No we don't need that.
I'll remove all unnecessary methods from SocialAuthProviderEvent (ProviderRedirectEvent) and SocialAuthProviderErrorEvent (ProviderErrorEvent).

Issue Status
Needs work
Contribution Author
Files count
0
Patches count
0