Is it possible to set the cancel button?



I am trying to use Hybridauth for logging in to some providers like facebook, linkedin and twitter.
I do use: SocalNick/ScnSocialAuth for this, which implements Hybridauth.

I have a problem with Twitter. I can login, but cancel does not work.

So, I go to the login window and click: [ cancel ]

Then I get the message: You have not signed in to app_name

Then I got these options:

[ return to app_name ]

Go to Twitter.
Go to the app_name homepage.

When I click the button: [ return to app_name ] I got this error:


Serialization of ‘Closure’ is not allowed.

I am not able to solve this problem. I think I would not have this problem if I could set a “Cancel Redirect URL” like in LinkedIn.

Is this possible somehow?



It’s not possible. Take a look at how the request comes in to your server when you hit the cancel button and prepare whatever is answering that callback with the possibility that the result was not successful. It looks like right now your code might assume that returning to the URL it’s arriving at implies success.


What are the reasons for not allowing a callback url for the cancel button? Because it seems to hamper the flow of our application, where the user has to click Go to the app_name homepage instead of automatically being redirected to it